Modify BaseQuery to be self-building

Builder now injects itself into the query, to allow the query to write itself.

- add `getSql` and `__toString` to BaseQuery
- add `setBuilder` and `getBuilder` to BaseQuery
- GenericBuilder calls `setBuilder` to inject itself into each query it creates
Not sure about this change... is it possible for every query to have it?