Change session scope

The session object is now managed per thread by the sqlalchemy
scoped_session function. This means objects are always in the session
unless explicitly removed (session.expunge), the session is closed
(session.close), or the thread session removed (scoped_session.remove).

In essence this makes the session global.
Change session scope to threaded (#25)

The session scope is now global per thread using the sqlalchemy
scoped_session function. The session_scope() decorator also does not
close the session. This means objects that are stored in lists do not
need to be added to a session to be used.