Keep track of expected next steps in the pipeline.

Summary:
This protects against errors caused by running pipeline steps out of
order or multiple times.  We've had some problems with folks running
set-default twice (because they clicked on an old set-default link
instead of the proper 'finish' link).  Or even with starting a new
deploy at the same commit-id as a previous deploy, which can cause
problems because the tokens match.

Use POSSIBLE_NEXT_STEPS to give a better message when the lock is stale.

Test Plan:
  webapp% env PYTHONPATH=.:tools ../jenkins-tools/deploy_pipeline.py acquire-lock --lockdir=$HOME/tmp/deploy.lockdir --deployer_email=csilvers@ka.org --git_revision=csilvers --auto_deploy=false --auto_rollback=false --jenkins_url=http://jenkins.khanacademy.org/ --hipchat_room=HipChat\ Tests --hipchat_sender=Mr\ Gorilla --deploy_email=prod-deploy@khanacademy.org --deploy_pw_file=/var/lib/jenkins/prod-deploy.pw
  webapp% env PYTHONPATH=.:tools ../jenkins-tools/deploy_pipeline.py set-default --lockdir=$HOME/tmp/deploy.lockdir

and it said:

[ERROR] @csilvers Expecting you to run merge-from-master, but you are running set-default. Perhaps you double-clicked on a link?  Ignoring.

  webapp% env PYTHONPATH=.:tools ../jenkins-tools/deploy_pipeline.py acquire-lock --lockdir=$HOME/tmp/deploy.lockdir --deployer_email=csilvers@ka.org --git_revision=csilvers --auto_deploy=false --auto_rollback=false --jenkins_url=http://jenkins.khanacademy.org/ --hipchat_room=HipChat\ Tests --hipchat_sender=Mr\ Gorilla --deploy_email=prod-deploy@khanacademy.org --deploy_pw_file=/var/lib/jenkins/prod-deploy.pw

and then edited ~/tmp/deploy.lockdir/deploy.prop to set
LOCK_ACQUIRE_TIME to 1400000000 and then re-ran

  webapp% env PYTHONPATH=.:tools ../jenkins-tools/deploy_pipeline.py acquire-lock --lockdir=$HOME/tmp/deploy.lockdir --deployer_email=csilvers@ka.org --git_revision=csilvers --auto_deploy=false --auto_rollback=false --jenkins_url=http://jenkins.khanacademy.org/ --hipchat_room=HipChat\ Tests --hipchat_sender=Mr\ Gorilla --deploy_email=prod-deploy@khanacademy.org --deploy_pw_file=/var/lib/jenkins/prod-deploy.pw

and it said (on hipchat):
 @csilvers csilvers has been deploying for over 111281 minutes. Perhaps it's a stray lock?  If you are confident that no deploy is currently running (check the dashboard at http://jenkins.khanacademy.org/), you can:
(failed) cancel their deploy: http://jenkins.khanacademy.org/job/deploy-finish/parambuild?TOKEN=&STATUS=failure
Once you done this, you will need to re-start your own deploy.

which is the right thing to do given that I haven't deployed yet.

Reviewers: chris

Reviewed By: chris

Differential Revision: http://phabricator.khanacademy.org/D11724