Start Integration testcase

This starts the IntegrationTestCase class as described in #4371. While it is incomplete, the parts that are done 'work', and I figured a smaller blob of changes would be easier to discuss and find problems with.
Is there any harm in using the app's session config? I was worried about people writing code dependent on the session config.