Remove session.flush() and session.query() monkey patching

Use custom Session class to avoid monkey patching of SqlAlchemy
Session instance.

blueprint db-session-cleanup

Change-Id: I7d40c20e585782403556f3587141805c197bfa64
Merge "Remove session.flush() and session.query() monkey patching"