Allow passing of base_metaclass to SQLAlchemy class

Small change to allow passing of a custom metaclass through to the base class creation.