setup.py: add metadata to register package to PyPI

This allows updating PyPI with just 'setup.py register' (assuming the user is
an owner or maintainer of the PyPI package).

--HG--
branch : stable
setup.py: ignore warnings from obsolete

Fix version detection with recent hg versions.

--HG--
branch : stable
rebase: restore active bookmark after rebase --continue

When a rebase has conflicts and the user uses rebase --continue, the previously
active bookmark was not being made active once again. With this change that
bookmark is made active again, just as if the rebase had never been interrupted.

This changes the rebasestate file format, but should handle old formats correctly.
Since the file is transient, this is even less of a problem.

Adds a test to verify the new behavior. I manually tested continuing rebases
with and without an active bookmark, and with and without being on the bookmark
being rebased.

--HG--
branch : stable
merge with stable

--HG--
branch : stable
localrepo: always write the filtered phasecache when nodes are destroyed (issue3827)

When the strip command is run, it calls repo.destroyed, which in turn checks if
we read _phasecache, and if we did calls filterunknown on it and flushes the
changes immediately. But in some cases, nothing causes _phasecache to be read,
so we miss out on this and the file remains the same on-disk.

Then a call to invalidate comes, which should refresh _phasecache if it
changed, but it didn't, so it keeps using the old one with the stripped
revision which causes an IndexError.

Test written by Yuya Nishihara.

--HG--
branch : stable