how does bitcoin solve the double spending problem