Backport of HIVE-3090 fix (from hive 0.10) to fix timestamp handling.

Timestamps with no fractional seconds are broken for TimestampWritable serialization/deserialization causing row value corruption.