hg log: solves bug regarding hg log -r 0:null (issue4039)

'hg log -r 0:null' was showing only one changeset(the '-1' one) instead of the first two changesets.

--HG--
branch : stable
commit: create new amend changeset as secret correctly for "--secret" option

Before this patch, "hg commit --amend --secret" doesn't create new
amend changeset as secret, even though the internal function
"commitfunc()" passed to "cmdutil.amend()" make "phases.new-commit"
configuration as "secret" temporarily.

"cmdutil.amend()" uses specified "commitfunc" only for temporary amend
commit, and creates the final amend commit changeset by
"localrepository.commitctx()" directly with memctx.

This patch creates new amend changeset as secret correctly for
"--secret" option, by changing "phases.new-commit" configuration
temporarily before "localrepository.commitctx()".

--HG--
branch : stable