add a way of getting db api from request.dbapi

It saves the return value (normally db session of sqlalchemy) of start() or start_ro() into request.dbapi so that people can use request.dbapi instead of a global session variable to access database.