[WIP] read build ID from db in commonplace, command to store build ID to db (bug 1083185)

PRing this pretty early as I'm knocking out soon.

Still needs tests, more error handling, a migration.
I thought about it, but on second thought, yeah I should use our ModelBase.