histedit: store backup file before histedit
It's possible for the user to delete some of the commits they started with
during a histedit, and aborting the histedit doesn't bring them back. Let's
store a backup bundle so we can always recover the stack of commits from before
they began.
histedit: replace pickle with custom serialization
Pickle is undesirable, so let's serialize it ourselves. We keep the ability to
parse existing pickle blobs for now.