git: Improve CreateOrResetBranch

CreateOrResetBranch now returns an Action instance that can be used to
rollback the changes implied by calling the function.

Change-Id: f997f86040
Story-Id: SF-84
release stage: Bring the command up to date

The steps that release stage goes through now are:

  1) Fetch the remote repository.
  2) Make sure the release branch is up to date (and that it actually exists).
  3) Make sure the stories can be staged.
  4) Check that no commits are being left behind (= they are on develop
     or some other branch, but not on the release branch). Print a warning
     and prompt the user in case there are actually some commits being left
     behind.
  5) Tag the release branch with the release tag.
  6) Delete the release branch.
  7) Reset the staging branch to point to the newly created tag.
  8) Stage the release in the issue tracker.
  9) Push the updates to the remote repository.

Change-Id: 6a28035c68
Story-Id: SF-84
jira: Implement common.RunningRelease interface

Change-Id: 81aef2d32f
Story-Id: SF-84
changes: Add DumpStoryChanges

changes.DumpStoryChanges can be used to dump []*StoryChange into an
io.Writer. It is nicely formatted and everything.

Change-Id: 8a9cfee115
Story-Id: SF-84
prompt: Add shortcut for cancellation panics

PanicCancel can be used to panic(ErrCancelled) while RecoverCancel can
be used to stop the panic from propagating. A handy shortcut for the
commands.

Change-Id: 5cfb691666
Story-Id: SF-84
git: ListStoryCommits: Case-insensitive tag match

Make sure that ListStoryCommits uses case-insensitive matching in
GrepCommits to find relevant story commits.

Change-Id: 95d7fe7028
Story-Id: SF-84
jira: Fix formatting issues

Change-Id: b2382eb3e0
Story-Id: SF-84
release stage: Ensure no commits are left behind

From now on, release stage checks to make sure that all changes assigned
to the stories that are associated with the release to be stages are
actually present on the release branch.

In other words, it warns the user in case there are some changes being
left behind, i.e. they have not been cherry-picked onto the release
branch yet. The user is prompted to confirm the staging process if that
is the case.

Change-Id: b7f985358e
Story-Id: SF-84
jira: Fix updateIssues

The rollback function was being called when the error is not nil, which
is exactly the opposite. It is supposed to be called when an error
occured to rollback the issues that were updated successfully.

Change-Id: ac1537f81c
Story-Id: SF-84
changes: DumpStoryChanges: Improve comments

Change-Id: 17e4cd31c2
Story-Id: SF-84
release stage: Minor optimization

Change-Id: d8fe202562
Story-Id: SF-84
Merge branch 'story/update-release-stage' into develop