Test for git if --commit is specified

Replace `git-symbolic-ref` based "isGit" check with a caching
`git-rev-parse --git-dir` based test that gives us more useful
information as a side effect.

SLN-1177 #refs
Ensure create --onto branch if it doesn't exist

SLN-1177 #refs
test: sls-sample-app loopback-example-app rename

Update refrence to match upstream example app's name change.
Use git detection to inform defaults

If working on a git repo, default is equivalent to:
   sl-build --install --bundle --commit --onto deploy

If not working on a git repo, default is equivalent to:
   sl-build --install --bundle --pack
git: Override GIT_INDEX_FILE for all git commands

This allows for better isolation between the developer's work and the
preparation of a deployment branch.
Make --onto a modifier for --commit

The --onto option overrides the default 'deploy' destination branch.
Only merge HEAD into deploy if necessary

If the destination branch is already up to date, there is no need to
sync the branch. This is the case when the branch is newly created or
when there have been no new commits since the previous merge.
Don't add empty build commits to graph

If the result of building is the same as the destination branch's content, don't bother adding an empty commit.
test: support mix of JS and shell based tests
test: replace onto tests with shell script

Shell script performs same basic tests, updated to account for --onto
being a modifier for --commit.