Cleanup usage of database sessions

~~This branch aims at shortening the length of our open transactions on the database. This should reduce problems when multiple threads need to access the database at similar times. Basic idea is to move away from using one long running transaction when dealing with the db, to using more shorter isolated transactions. Things like online lookups and expensive parsing should not be happening while we hold a transaction open.~~ This turned into more of just a general cleanup of our usage of database sessions.

- [x] `Session` now supports use as a context manager, to auto commit/rollback
- [x] ~imdb_lookup no longer does online queries while transactions are open~
- [x] Series plugin no longer stores `Release` objects on entry (since they will be detached from their session before being needed again)
- [x] Improved --debug-db-sessions

Things to look in to:
- [x] series plugin should not hold transaction open for all parsing
- [x] all lookup plugins
- [x] `with_session` helper may not be a good idea anymore, investigate usages
- [x] simple task persistence should probably not be using task.session anymore