Holy crap the DB keys need to be big-endian!  They're not!

I just reworked a ton of code and tried to isolate all the endianness
switches to a few key functions and then used those everywhere.  I also
upgraded the put_uintX_t and get_uintX_t methods to take an extra
endianness enum argument (LE or LITTLEENDIAN and BE or BIGENDIAN), and
used them in the upgrade of the Stored* objects and leveldb_wrapper.

All tests have been upgraded with the hardcoded answer strings modified
appropriately, and all passing again.  Up to 4500 lines with 111 tests.