reviewboard: Put config into the local config file

From now on it is required to set review_board.server_url in the local
project configuration file. This URL is used when calling rbt as the
server option (--server).

Story-Id: SF-85
Change-Id: d92934ed63
jira: Configure credentials on per-server basis

From now on the global config format is

  jira:
    credentials:
      - base_prefix: string
        username:    string
        password:    string

When SalsaFlow needs to access JIRA, it looks for the best matching
credentials based on the base_prefix. The best matching credentials are
these where the longest part of the base URL matches.

Story-Id: SF-86
Change-Id: 271adf2a13
jira: Do not assign sub-tasks on release start

Do not assign sub-tasks to JIRA versions. It is not really necessary
since the parent issues represents what needs to be done and the
sub-tasks would only polute the version overview.

Change-Id: 4aadb43410
Story-Id: SF-77
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
log: Make it possible to manipulate the writer

Add functions to make it possible to manipulate the internal log writer.
This can be used to disable logging and stuff.

Change-Id: d2885f2fd3
Story-Id: SF-88
changes: Add StoryChanges

Pull some functionality out of release stage and put it into
StoryChanges. This function can be used to get StoryChangeGroups
associated with the given stories. Include/exclude source filter can be
supplied to filter the changes returned.

Change-Id: 3549f3a657
Story-Id: SF-88
release changes: Bring the command up to date

Change-Id: 998457b48b
Story-Id: SF-88
release stage: Fix regexp in checkCommits

Change-Id: e77173ac02
Story-Id: SF-84
jira: Fix staging in RunningRelease implementation

runninRelease.EnsureStageable was not making sure that also the
sub-tasks are ok, i.e. they are in the Done state.

runningRelease.Stage was trying to stage all issues assigned to the
current release. This should be limited to the issues that are Tested,
otherwise the transition does not make sense.

The checks are only checking states, not issue types. This is to make
the implementation a bit more robust against changes in the workflow, or
rather adding new issue types.

Change-Id: fe6a6a4e31
Story-Id: SF-84