Fix for timestamp losing milliseconds. Making timestamp work for nano-second level arithmetic.

Changed the way we serialize and de-serialize timestamps to handle the weird way in which java.sql.TimeStamp ends up eating milliseconds.