Convert timestamps values into python datetimes

With this change timestamps are converted into datetime.datetime values
instead of being passed through as strings. Datetime conversion seems to
be the standard thing to do for a DB API 2 library.
Factored timestamp parsing into fn

Also fixed 2-space tabs into 4-space tabs