Added basic_auth to hg

Now with the (hopefully) working code
Added support for basic authentication to hg provider
Updated unit tests
Updated hg readme and added examples
@sodabrew You are right, have fixed that, thanks!