Allow date type to be selected in toArray().

The options are:
- default: leave as DataTime.
- 'string': string formatted as ISO8601, including microseconds.
- 'mongo': MongoDate instance.