Clean up .gitignore

.gitignore was pretty cluttered with unneeded Eclipse/Visual
Studio
rules. Also, we don't really need to commit the actual test DB.
Factor out more settings

Move some debug settings to config
Boilerplate

Adding relationships that I thought were already there
Also close the scoped session when the request is finished