Merge test code into main shotwell code.
Fix case where ldexp(1.0, 16) == 0x10000; remove excessive asserts.