[TestWebServer] Add support for running actions when responding.

My particular use case is to allow arbitrary delays to be inserted
when responding to requests to test responding to failed page loads.

I do this by inserting a Runnable that waits on a lock that is only
notified/released on when we have handled the page failed response by clicking
the stop button in the UI.

BUG=306670
R=yfriedman@chromium.org

Review URL: https://codereview.chromium.org/27721003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229471 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 229471
Fix error message values in bb_device_steps.py after r229193 (Build fix).

TBR=peter@chromium.org
BUG=

Review URL: https://codereview.chromium.org/29653003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229472 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 229472