unit tests now pass when running on 64 bit simulators

Fixes bug on 64 bit that had problems with signing. There was in fact a good reason in the original code to chop of the most significant bits.

This is a fix to get things back to normal. I'm going to propose a more radical change to make the signed interaction with SQLite more obvious.