DEV: Close transactions at the end of HTTP Requests.

Fixes #84
TEST: Use a temporary file instead of a local file for test db.
Merge pull request #86 from quantopian/sessions-take-2

DEV: Close transactions at the end of HTTP Requests.