add a waited_for column to the buildrequests table

This new column will be used to break deadlock when a waitForFinish trigger step conflicts with a "clean shutdown" of buildbot, in a future pull request. Details here: http://trac.buildbot.net/ticket/2019

All tests pass.

This branch is based on https://github.com/bukzor/buildbot/tree/buck-nine-2013-08-06 which is a merge of my various pending pull requests. This was necessary to get everything passing.