3.0 datetime marshall

Implements the changes required for #2643.  I thought that marshalling from request to PHP equivalents is very similar to the other type conversions done in the `Database\Type` system. I've integrated it into the marshaller, and each type class can implement custom marshalling functions.