The UK Treasury is to examine digital currencies to better understand the risks and benefits offered by the technology.