histedit: abort gracefully on --continue/--abort with no state

Previously we'd print an ugly message saying that the histedit-state file
doesn't exist in the repo.

--HG--
branch : stable
extra : rebase_source : 35e529b98331d2ef9620262bed40674e09364b56
dispatch: make "_checkshellalias" reusable regardless of adding aliases

To reduce changes in the subsequent patch fixing issue4355, this patch
makes "_checkshellalias" reusable regardless of adding aliases.

In this patch, alias definitions are added and restored, only when
"precheck=True".

--HG--
branch : stable
dispatch: check shell alias again after loading extensions (issue4355)

Before this patch, the shell alias causes failure when it takes its
specific (= unknown for "hg") options in the command line, because
"_parse()" can't accept them.

This is the regression introduced by 03d345da0579.

It fixed the issue that ambiguity between shell aliases and commands
defined by extensions was ignored. But it also caused that ambiguous
shell alias is handled in "_parse()" even if it takes specific options
in the command line.

To avoid such failure, this patch checks shell alias again after
loading extensions.

All aliases and commands (including ones defined by extensions) are
completely defined before the 2nd (= newly added in this patch)
"_checkshellalias()" invocation, and "cmdutil.findcmd(strict=False)"
can detect ambiguity between them correctly.

For efficiency, this patch does:

  - omit the 2nd "_checkshellalias()" invocation if "[ui] strict= True"

    it causes "cmdutil.findcmd(strict=True)", of which result should
    be equal to one of the 1st invocation before adding aliases

  - avoid removing the 1st "_checkshellalias()" invocation

    it causes "cmdutil.findcmd(strict=True)" invocation preventing
    shell alias execution from loading extensions uselessly

--HG--
branch : stable