Fix encodeNonzeroTime to encode timestamps correctly.

This is a fix for the datetime binary encoding.  I was inserting timestamps and most of the time they were showing up in MySQL as  "0000-00-00 00:00:00, even though the values definitely contained valid timestamps. Sometimes, the timestamps did insert correctly, though.

I narrowed it down to an encoding problem with the microseconds field.

Also, it seems like may be related to issue #74? @ex-troll can you give this a try.