test-hg-tags-invalid: add a test for tag with space in it

There was previously an attempt to handle this but no test coverage.
git_handler.get_changed_refs: drop support for ancient Mercurial versions
git_handler: add a way to get all heads that can be exported to Git

This is a replacement for local_heads and code duplication around it.
Centralizing all this logic also makes it much easier for extensions to define
other sorts of refs.
git_handler.update_references: switch to using get_exportable
git_handler.get_changed_refs: switch to using get_exportable

This also means we get to clean up a lot of the code around here. It isn't
really feasible to break this up into several commits because the assumptions
in the old calling code are too closely tied to the old local_heads() way of
doing things.
git_handler.get_chanaged_refs: use exportable for no-ref check

The comment was actually incorrect -- we only used to care about bookmarks. Now
we also care about tags.
git_handler.get_changed_refs: remove now-unused all_heads variable
git_handler: remove now-unused local_heads method
git_handler.fetch: remove dead remoteref function