push initial deploy to branch if upstream is empty
push initial deploy to branch if upstream is empty

This change detects if the remote repository contains the deploy branch - if
that branch does not exist, then an initial deploy is made. If that branch does
exist then the old code path is hit, and the regular incremental deploy is made.

By and large this is a backport from X1011's code into this repo. This may
look like a significant change set, but it is mostly moving code around:

The key changes are L172-182; L172-177 does the detection of a
remote branch and was pulled direct from X1011's version[1]. L179-182
does the switching, determining which code path to use to push the branch
and again, was pulled right from X1011's version[2].

L185+ has been moved to the two functions `incremental_deploy` and
`commit+push` which are very, very similar to X1011's[3] but keep the
divergeant changes from this repo. L117-122 (`initial_deploy`) is new
code, once again pulled right from X1011[4]

[1]: https://github.com/X1011/git-directory-deploy/blob/e37ac94cda4bfc5773c0f01d89d8c875a21ab4f9/deploy.sh#L123-L129
[2]: https://github.com/X1011/git-directory-deploy/blob/e37ac94cda4bfc5773c0f01d89d8c875a21ab4f9/deploy.sh#L132-L135
[3]: https://github.com/X1011/git-directory-deploy/blob/e37ac94cda4bfc5773c0f01d89d8c875a21ab4f9/deploy.sh#L146-L174
[4]: https://github.com/X1011/git-directory-deploy/blob/e37ac94cda4bfc5773c0f01d89d8c875a21ab4f9/deploy.sh#L140-L144

To make a quick test case, take any repo you have and run:

    git-directory-deploy --branch doesnotexist

Prior to this change, this command will fail as the branch doesn't exist.
Subsequent to this change, the command works.
lukekarrys/git-directory-deploy,lukekarrys/git-directory-deploy