rebase: handle detached HEADs in `init`
rebase: handle detached HEADs in `init`

When `init`ing a rebase from a detached HEAD, be sure to remember
that we were in a detached HEAD state so that we can correctly
`abort` the object that we just created.

Corillian/libgit2,stewid/libgit2,Corillian/libgit2,Corillian/libgit2,Corillian/libgit2,stewid/libgit2,stewid/libgit2,stewid/libgit2,Corillian/libgit2,Corillian/libgit2,stewid/libgit2,stewid/libgit2