Extract parsing from command processing

This will allow the "for each instruction, do this" code to be re-used
for other things than rebuilding the integration branch.

Let's also start the process of having some comments in the code by
adding them for the new functions introduced here.

Signed-off-by: John Keeping <john@keeping.me.uk>
Set PS4 in debug mode

When GIT_INTEGRATION_DEBUG is specified, it's also useful to also have
the filename and line numbers with the trace.  Do this by also setting
PS4 when $GIT_INTEGRATION_DEBUG is non-empty.

Signed-off-by: John Keeping <john@keeping.me.uk>
Die if run_integration fails

Since we pipe data into run_integration, it runs in a subshell and hence
can die without causing git-integration itself to fail.

Currently this isn't a problem since the call to run_integration is the
last thing to happen in integration_rebuild, which is in turn only ever
called at the end of git-integration.  But if another command that get
sequenced after rebuild is added, we will end up running that when we
shouldn't or hiding the exit code from integration_rebuild.

Signed-off-by: John Keeping <john@keeping.me.uk>
Add --status command

!!! THIS IS STILL MISSING TESTS AND DOCUMENTATION !!!

Signed-off-by: John Keeping <john@keeping.me.uk>