Fix problem with cmp_xchg when double

- Gcc 4.8 is not correctly optimizing the code when using cmp_xchg
  assembly instruction together with double. This change will fix it by
  first converting the double to uint64_t and then calling the cmp_xchg
  instruction.
Documented the reason why we need specialization of cmp_xchg over double.
Merge branch 'dohse-cmp_xchg-double-bug'