Allow do_commit to make dangling commits

do_commit has a lot of process that is useful for any arbitrary commit.

do_commit creates dangling commits by setting ref=None and specifying
the commit parents with merge_heads.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>