Allow to authenticate to Gerrit with HTTP basic auth

Gerrit instances running at googlesource.com require authentication
with HTTP basic auth.

Add a new config option to allow to specify either basic auth or digest
auth. Default to digest auth if not specified.

Change-Id: Iab6f666082bd3fee2c77a8c489255926cc93edba
Closes-Bug: 291