Set a default type for queries.

By not having a default query type, the sql() method would fatally error
if you had not called select() or a similar method before hand. This
change also impacts the SQLite driver as it does tricky things with
unions to simulate multi-inserts.

This also fixes strange errors when matching() callbacks trigger errors.

Refs #3697
Merge pull request #3709 from cakephp/issue-3697

3.0 - Set a default type for queries.