Refactor into standalone build scripts.

* Move build scripts from ./scripts/ to ./ci/.
* Overridable environment variables for test builds (see README.md).
* Suppress all output from `git commit`.
* Fix infinite `git commit` loop on PR branches.