General refactoring and cleanup.

* Use /bin/sh instead of bash.
* Support a branch in Godeps lines.
* Find the Godeps file in parent directories.
* Remove parallelization; it breaks with complex package relationships.
* Eliminate needless pulls/checkouts and speed up the process.
* Search for an appropriate branch and avoid detached HEAD state.
Fix wrong idea about branches and detached HEAD
Merge pull request #35 from VividCortex/refactoring

Refactoring