Move misc_utils module out of git.js

Move misc_utils module out of git.js and make it global.
This module has no js dependency. As a next step I will re-write it in
dart which will help to port other code to dart.

@devoncarew  PTAL