Better environment management

Use an external package for dsn parsing, and minimize the
logic required in the app template
Merge pull request #28 from FriendsOfCake/feature/better-env

RFC: Better Environment management