Simplify constructor logic.

Chaining through multiple objects makes mocking and testing harder.
Moving method calls out of the constructor makes the ResultSet simpler to
work with. This will be more important as serialize features are
implemented.
Add setResult() to Query.

This will allow beforeFind() callbacks to avoid query execution by
setting seeding results.
Make Query take required arguments in its constructor.

Calling the repository() method was not optional. Since the dependency
is required it makes the most sense as a constructor argument.
Rename properties

counter and count were confusing and the new names fit the actual use
better I think.
Make ResultSet buffer the statement results.

This will allow it to more easily implement serializable interface,
which will be important for caching results.
Add rewind() support to ResultSet objects.

By buffering the results a ResultSet object can be rewound and re-used.
This will also help implement caching as PDOStatements cannot be
serialized.

There is now some duplication of buffering logic between ResultSet
and BufferedStatement. That will need to be solved later.
Make ResultSets serializable.

By implementing Serializable, ResultSets can be persisted into
a persistent cache like Memcache. Unserializing needs only to set the
results again as other properties are set to their defaults.
Add support for JsonSerializable.

Fix issues with deserializing ResultSets, where a `false` would be
appended to the stored results.