+ Make sure that the curline.histnum variable is accurate at the end
of our history processing, even if we read in some foreign history
and/or if we replaced the prior line because it was a duplicate of
the current one. This enables the history (fc -l) command to work
properly, even if the current command was HIST_NO_SPACE-ed away.
+ Don't allow remhist() to remove the last line in the history if we
didn't store the current command.
+ The non-HAVE_LINK code in lockhistfile() was broken in a number of ways.
+ Added an extra unlink() call to the HAVE_LINK code in lockhistfile()
since (Linix at least says that) O_EXCL over NFS is broken.