rewrite the build staging command using sh lib

* do better checks
* break down into stages
  - fetch: fetches all the branches in each of the relevant submodules
  - sync: makes sure your local copy is in sync with origin
  - check: checks to make sure trunk can merge into each of your branches
  - rebuild: rebuilds staging and force pushes