ESC-17 Add support for Play 2 applications to persist to database

* This is not using application data sources yet, more work needed.
* Try to use more for comprehensions to cleaner code base and avoid
touching Option methods directly, and code in a more monadic style.
* Since Play! applications remove logging handlers when starting up
(great!), add some logic to cache current log handlers when starting
Play applications and restore them right after.
* Switch to Dev mode for applications so that multiple applications
can be deployed one after the one and avoid previous application
configuration to be cached.