rebase: fix working copy location after a --collapse (issue4080)

Rebasing with --collapse would leave the working copy on the parent of the
collapsed commit, instead of on the collapsed commit.  This fixes that.  Also
fixes a few tests that already covered this area but had bad data.

This also fixes issue3716 where bookmarks are not kept across rebases with
--collapse. I updated the test to cover that case as well.
minirst: do not interpret a directive as a literal block

When a directive was on its own line, it was interpreted as a literal block.

Example of problematic input:

.. note::

    a note text
minirst: do not fail on an empty admonition block
minirst: find admonitions before pruning comments and adding margins

Lines with only a directive are not deleted anymore because they are detected
before comments are deleted by prunecomments().
addmargins() will be adapted later.
minirst: do not add a 2nd empty paragraph

This does not add a separating block after a separated note directive.

.. note::

    text

is formatted to

Note:
    text
tests: modify minirst test input to new format

Modifying the test input data shows the effects of the last patches.
In text output nothing has changed.
In html output the title has moved on its own line.
i18n-pt_BR: synchronized with d24ee6d7d167
documentation: add an extra newline after note directive

Like this no docutils version interprets any line in the following text as
argument of note.
check-code: check comment for '.. note::' without two newlines

Because string entries are replaced before matching, we must search for
the transformed pattern. But it seems to be quite unique and does not return
false matches. If it will, they can be listed as 3rd arg in pypats.
check-code: more replacement characters

for finding '.. note::' (even) more exact by using more characters:
replace '.' with 'p' and ':' with 'q'
merge: move forgets to the beginning of the action list

Forgets need to be in the beginning of the action list, same as removes. This
lets us avoid clashes in the dirstate where a directory is forgotten and a
file with the same name is added, or vice versa.
merge with stable
date: allow %z in format (issue4040)
Makefile: do update on a temporary copy of a po file

This avoids having a half completed file (with a new timestamp) when msgmerge
has failed.
scmutil: skip checks in "casecollisionauditor" if filename is already checked

Before this patch, almost all of check code in
"casecollisionauditor.__call__()" is executed, even if specified
filename is already checked, because "f in self._newfiles" is examined
lastly.

In addition to it, adding "fl" to "self._loweredfiles" and "f" to
"self._newfiles" are also redundant in such case.

This patch checks "f in self._newfiles" first, and returns immediately
to avoid execution of check code for efficiency.
make: restrict recursion in make clean
tests: skip tests that require not having root (issue4089)

This adds a new root hghave to test against. Almost all of these are a
subset of unix-permissions, but that is also used for checking exec
bit handling.
contrib: add editmerge script for editor conflict prompts

Adds a script that opens the editor to the conflict as part of the merge
process. This way you can fix the merge during the rebase instead of having to
pause the rebase, resolve --mark, rebase --continue.

Only works on unix.
merge with stable
check-code: drop unneeded ignore patterns

The exceptions seem to have disappeared.