small refactoring commit controller

1. Moved commit controller to own file
2. Refactored commit controller a little bit
3. Made the jslint compliant (this makes it a little inconsistent with the rest of the code, feel free to give me your opinion on that)
4. changed stdout.js so it only closes WebSocket if it is really open
5. Do only connect to remote console if really started
6. ng-if on pr include template gave me angularjs errors, don't know why yet. used ng-show which resolved id.

I would appreciate some feedback =)

David