Remove offset from cloned queries used in subquery loads.

Having an offset in a subquery causes SQL errors in MySQL. Also
include a test to ensure HAVING is not an issue.

Fixes #4465
Remove problematic test.

This test will always pass in MySQL/SQLite but will always fail in
Postgres/SQLserver. Since it provides no real value there is no point in
keeping it.
Merge pull request #4473 from cakephp/issue-4465

Remove offset from cloned queries used in subquery loads.
Add query->clear().

I found a few duplicated blocks of code related to clearing query state
when subqueries are created. Having a function will help prevent code
getting out of sync in the future.