- use builderid as a foreign key instead of using buildername for the table buildrequests
 - addbuilset take a list of buildersID
 - check signatures for the BaseScheduler?'s addBuildsetForXxx methods
Add @defer.inlineCallbacks to br_consumer_cb and buildRequestAdded
I think this is needed since a12242da69e76f34cc45523c5a928b19e676d3ff. Dustin, do you confirm ?
Fix: master/buildbot/status/master.py:423: import 'builder' from line 25 shadowed by loop variable
 - improve master/db/migrate/versions/037_buildrequests_builderid.py as dustin suggested
 - various minor fix
 - Done:
   - DB API changes reflected in the doc
   - DATA API changes reflected in the doc
   - DATA API for buildrequest's dropping /builders/i:buildername/buildrequests or not (code drops, path still in place)
   - DATA API changes need to be reflected in the FakeData API
   - trigger steps now gets {builderid:buidrequestid} back from the sched.trigger call
   - Try Schedulers's RemoteBuildSetStatus.getBuildRequest should return builder names but returns builder ids
 - todo:
   - SchedulerMixin._addBuildsetReturnValue returns buildernames, but should return builderids
   - BuilderStatus.getPendingBuildRequestStatuses calls db.getBuildRequests (... buildername=...". It's Ok to just assert 0 in this method.
     The whole class will go away soon. Just don't leave it subtly broken
Merge branch 'master' into trac2621_2658

Conflicts:
	master/buildbot/test/unit/test_steps_trigger.py
done:
 - SchedulerMixin._addBuildsetReturnValue returns buildernames, but should return builderids
 - BuilderStatus.getPendingBuildRequestStatuses calls db.getBuildRequests (... buildername=...". It's Ok to just assert 0 in this method.
   The whole class will go away soon. Just don't leave it subtly broken
 - update and fix unittests
Fix the type of the 'masterid' case statement

It seems that newish versions of pg8000 complain (probably correctly)
that a case statement is of text type, but the masterid column should be
an integer.  This adds an explicit cast, which works fine across all
three database engines.
Fix: master/docs/developer/rtype-buildset.rst about addBuildset returns
Merge pull request #1242 from delanne/trac2621_2658

PR for trac #2621 and trac #2658

Fixes ticket:2621
Fixes ticket:2658
Merge pull request #1255 from djmitche/025-masterid-type-fix

Fix the type of the 'masterid' case statement

See ticket:2933
Fix SQLAlchemy-Migrate version check

It failed for strings like `'0.9.1-r0'`.

```
$ buildbot create-master foobar
[...]
  File "/usr/lib/python2.7/site-packages/buildbot/db/model.py", line 547, in upgrade
    check_sqlalchemy_migrate_version()
  File "/usr/lib/python2.7/site-packages/buildbot/db/model.py", line 502, in check_sqlalchemy_migrate_version
    version_tup = tuple(map(int, version.split('.')))
exceptions.ValueError: invalid literal for int() with base 10: '1-r0'

$ python2 -c "import migrate; print(migrate.__version__)"
0.9.1-r0
```
Merge heinrich5991/buildbot:pr_versioncheck (PR #1259)