PHP-1218: Added MongoDate::toDateTime() to convert a MongoDate object to PHP's DateTime object.
Extract duplicated code into a helper function.