A Shanghai judge has ruled that Bitcoin and cryptocurrency are property and that their ownership is legal in China.