use BUILD_COMMITS policy when retrying builds
tweaks and changes

Various tweaks, changes and additions from recent weeks.
It's a mess but it needs committing...
* build from pull request's auto-merge commit
* documented support for basic auth via jenkins api token
* janky-ish commit statuses
* lots of api boilerplate to make the above easier