Refactor common shell functions out.

Also adds a buildr plugin that can return the absolute path to the checkout root or the subproject root.

For example:
```bash
source "$(buildr -s checkout_root)/bin/bash_functions"
```

Please note that you must invoke buildr with the `-s` option or else you'll get extra output that you don't want.