Add support for custom Session class and Query class

... and consolidate all places where BaseQuery is hardcoded, to use SQLAlchemy.query_class. Basically this patch is to increase configurability for the end user without mucking with internals much.

There was an instance where setting query_class in the Model didn't change the Query objects on relationship / relation / dynamic_loader as used in _include_sqlalchemy(). At first I thought this was a bug but then after reading the SQLAlchemy class docstring it looks like it's by design? Anyway, I "fixed" it and I added a test case for that, but let me know and I can revert that.

This patch is part of a larger project to integrate sharding support (or make a flask.ext.sharding), as in #130, so it may or may not make sense to integrate this in at this point, but I'd love to hear comments from @DasIch and @mitsuhiko to steer me in the right direction.