Make repo.commit use a custom commitctx wrapper
This avoids forcing the dirstate of overwritten files to normal
during a commit.
Thanks to Dan Villiom Podlaski Christiansen for the idea of a
"double wrapper", so other extensions can still wrap
repo.commitctx safely.