Add SQLAlchemy hybrid properties for most indirect properties of the models.

This will make porting debile-web to the current db schema much easier.
Add files_{path,url} to Job model, and use them in FileRepo.
Rework and simplify session creation.

* Deduplicates session creation code, will also be reused by debile-web