Rudimentary implementation of config-changed hook to support changing to another application revision.

"app_branch" might now be a revision other than a branch.
Fetch with parameter branch/commit is wrong. Change to pull to ensure local branch is merged with the remote.
Fixed the branch detection logic as there are asterix/space in front of the active branch.
Ensure switch to the local branch before "git pull" so that the merge part will be right.
Add support for procfiles (LP: #1123939) and setting config through environment (LP: #1123965).
Updated documentation for Procfile and environment variables.
Merge in branch lp1123939_procfile_support.
Merge in branch lp1130092_update_support_for_user_application.

Merged conflict caused by both adding config-changed hook.
Made config-changed hook executable.

Solves Lint Check: "warn: config-changed not executable"
Run "npm install" agin after update in case new nodejs dependencies are introduced.

Also fix the file owners again.
Port is set with foreman with the "-p" option.

This is actually the port for the first server, but we only support one instance now
(else all ports should have been communicated through the "website" relation).
Merged in "npm install" fix.
Merged in latest from lp1123939_procfile_support.
Again (...) "Made config-changed hook executable"
Improve algorithm for updating from git. It was not working properly for commit IDs and new remote branches.
Merge in latest from lp1130092_update_support_for_user_application.
Started implementation of "Support for polling for new SCM branch content" (LP: 1147788)
Merged "Support for polling for new SCM branch content" (LP: 1147788)

and did some bugfixing for it to work.
Add "cron_schedule" config option to specify polling interval.
Actually check for git updates before comparing old and new version.