Restore 'gear build' functionality on normal gears

Restore 'gear build' functionality on normal gears.

If building from Jenkins, use $GIT_BRANCH as the git ref.

If building in a normal gear, call ApplicationRepository#archive to
replace the contents of app-root/runtime/repo with the ref to build.

Exclude .git when rsyncing the repo content from the Jenkins builder
gear to the upstream gear.

Bug 1022361
Hide report deployments desc
Improve error handling in gear script

Add UsageException

Switch puts/raise 255 to raise UsageException
Merge pull request #3969 from danmcp/master

Merged by openshift-bot
Automatic commit of package [rubygem-openshift-origin-controller] release [1.16.3-1].
Merge pull request #3971 from ncdc/bz1022361

Merged by openshift-bot