Parse dates properly when using includes in sqlite

Closes #1355

As the only dialect, sqlite relies on querying the database to get the types of fields. However, this would break when using includes, because the regex used to identify table names in the sql didn't like includes. I've changed it so that the table names are collected while processing the includes, and these are then passed on to sqlite/query.js This is not a very pretty way to do it, but should suffix for the release of 1.7, until we can look more at a general up / down for datatypes in 2.0