Refactor dry_run_commit

Hoist prepare_index out of dry_run_commit since it is called for normal
commit and dry run commit. This is a prepare commit for allowing hunk
editing for commit with --patch and --message. No functional change.

Signed-off-by: Jun Hao <jhao12@bloomberg.net>
Signed-off-by: Andy Trzeciak <atrzeciak@bloomberg.net>
Allow hunk editing for commit w/ patch and message

When passing in --patch and --message for commit command, the editor fail to open
if user choose to hunk editing. This issue is caused by --message set GIT_EDITOR to
empty before --patch invoke interactive_add.

Move setting GIT_EDITOR after prepare_index where interactive_add is called.

Signed-off-by: Jun Hao <jhao12@bloomberg.net>
Signed-off-by: Andy Trzeciak <atrzeciak@bloomberg.net>