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)