Fix for #68 | Use .gitignore files (with proper semantics)

--HG--
extra : __touch-noise__ : 448676546
git-handler: turn refs from None to {} so that empty git repos can convert
setup: bump dep on dulwich to 0.9.4
tests: dulwich is now smarter about sending fewer objects, update output
test-timezone.t: add missing (but needed) trailing whitespace
overlay: add kludge to make sure we only ever give hexshas to dulwich
git_handler: iterate over new refs in sorted order to stabilize test output

An earlier patch already fixes the test expectations (oops), so this
just makes sure the tests always pass.
gitignore: gate feature on dirstate having rootcache and ignore having readpats

--HG--
extra : amend_source : 3b2f5145693b18b4dbf899925dec658097ac874f
testedwith: add 2.8.1

--HG--
extra : rebase_source : 06a5ce423038b5ed0f84a1957f600ce324ab3951
testedwith: drop 2.3.1, which has at least one test failure

--HG--
extra : rebase_source : bd3b50a14c78659698b77ad4c6cc8ca00e383899
test-subrepos.t: hide output from newer hg versions about active bookmarks

--HG--
extra : rebase_source : c16c681139f90a6e0bd1b9b273065be003c71c78
setup: bump version
Added tag 0.5.0 for changeset ef41e87ea11a
Added signature for changeset 2f7bd8db709f
git_handler.py:  less cryptic error message when push fails
tests: fix output expectations from 3ff09f0
Update COPYING file to the latest license texts from http://www.gnu.org/licenses/gpl-2.0.txt
gitdirstate: import errno for handling OSError

When handling OSError while visiting subdirectories, we're checking
errno, but we never imported this module. This small patch fixes this.
git_handler: don't bail on multiple octopus merges in succession

Consider two octopus merges, one of which is a child of the other. Without this
patch, get_git_parents() called on the second octopus merge checks that each p1
is neither in the middle of an octopus merge nor the end of it. Since the end
of the first octopus merge is a p1 of the second one, this asserts.

Change the sanity check to only make sure that p1 is not in the middle of an
octopus merge.
support for http(s) basic authentication

This is an adaptation of the original patch submitted in [1], without the
monkey-patching: a patch has been committed in dulwich [2] which allows clients
to supply a custom urllib2 "opener" for opening the url; here, we provide such
an opener, which provides authentication information obtained from the hg
config.

[1] https://groups.google.com/forum/#!topic/hg-git/9clPr1wdtiw
[2] https://bugs.launchpad.net/dulwich/+bug/909037