Fix Unicode/bytes handling for Basic Auth in Py3

Also add tests for Basic Auth handling.
Merge pull request #128 from adamgreig/py3_auth

Fix Unicode/bytes handling for Basic Auth in Py3