Undo tag and stage it when git-send-email(1) fails

If there was an error during git-send-email(1) or the user aborted it,
undo the latest tag.  This saves the user from manually running git tag
-d.

Note that we must not lose the cover letter, so stage the latest cover
letter (just like git-publish --edit).  When the user tries again their
latest cover letter will be available.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add invoke_hook() to run githooks(5)

The githooks(5) mechanism makes it easy to customize behavior with user
scripts.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add pre-publish-send-email hook

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>