Refactor "integration in progress" logic

This will make it easier to put in a finer grained check that can allow
some commands (like "git integration --cat") to proceed even when an
integration is already in progress.

Signed-off-by: John Keeping <john@keeping.me.uk>
Allow --cat and --status to be performed while rebuilding

There is no reason read-only operations should not be permitted while a
rebuild is in-progress.  "--status" might do some weird things if the
branch changes underneath it, but the primary use-case for this is
inspecting the previous state of the branch while paused due to a
conflict during the rebuild.

Signed-off-by: John Keeping <john@keeping.me.uk>
Infer branch name correctly when rebuilding

Now that we can use `--cat` and `--status` while rebuilding, also make
sure that the branch name is inferred correctly when it is not specified
on the command line.

Signed-off-by: John Keeping <john@keeping.me.uk>
Merge branch 'allow-cat-while-in-progress'

Allow inspection commands to be used while an integration is
in-progress.  There has never been a good reason for disallowing these
commands, they were just caught in a wide net.

* allow-cat-while-in-progress:
  Infer branch name correctly when rebuilding
  Allow --cat and --status to be performed while rebuilding
  Refactor "integration in progress" logic