bin/commit: move parent checking code higher up
bin/commit: move parent checking code higher up

No functional change. Prep for the next commit.

Closes: #1402
Approved by: cgwalters

GNOME/ostree,GNOME/ostree,GNOME/ostree,GNOME/ostree,GNOME/ostree