http: Add an option for forcing basic authentication

The default is to autodetect the auth method. This does require one
extra request (and also closing and reopening the http connection).
For some cases such as HTTP POST, the autodetection is not handled
properly (yet).

No option is added for digest, since this method requires getting
nonce parameters from the server first and can't be used straight
away like Basic.

Signed-off-by: Martin Storsjö <martin@martin.st>
