Use model_query from oslo.db

This change makes nova.db.sqlalchemy.api.model_query() a wrapper round
oslo.db.sqlalchemy.utils.model_query().

Arguments to model_query are brought in line with the version in
oslo.db, which removes the need for heuristic introspection of the
model argument. This creates some noise in the patch, as all callers
which previously used the base_model argument have had to be updated.

model_query from oslo.db returns a TypeError rather than a ValueError for an
invalid model, so the invalid arguments test is updated accordingly.

This requires N309 to have been disabled for sqlalchemy/api.py, as it
will complain about the session argument to model_query.

Change-Id: I3dc48c4ebb7ea4576429cf836bae995ede21ce30
Merge "Use model_query from oslo.db"