Fix --debug handling in the shell

This sets the debug level globally on root logger so that every debug
calls are logged.

Change-Id: Ia8d61f213b2bc6c4bcb1038e7ff6ac0104581b4b
Closes-Bug: #1259210
Avoid meaningless comparison that leads to a TypeError

The "requests" module tries to do this comparison in raise_for_status():

    400 <= self.status_code < 500

with "self.status_code" being "None". In Python2, it's a valid comparison, but
in Python3, it triggers a TypeError. We fix it by giving a valid default value
to "self.status_code".

Change-Id: I9ea9ecfb698546a7f6526464aa528441bb7c1ccd
Merge "Fix --debug handling in the shell"
Change assertEquals to assertIsNone

Some tests were using assertEquals where they should have used
assertIsNone. assertEquals doesn't distinguish False from None.

Change-Id: Id7dc1075fbaaa9a6dbff5b05ab587df39c79c180
Merge "Avoid meaningless comparison that leads to a TypeError"
Remove debug specific handling

I think debug handling was initially done this way for CLI handling
where we wanted to make sure only the correct information was printed to
the console. However as logging.basicConfig sets up a stream handler on
the root logging object I can't see any purpose to the debug handling in
the actual HTTPClient. Further than this it is completely wrong that a
client library is messing with it's logging level, this should be handled
by an application.

The debug flag is maintained and deprecated in HTTPClient and removed
from the session object. There has been no release since the addition of
session so there is no problem with compatibility.

Change-Id: Ib00f3d93d099ed1a9dd25f17121610a7289f0061
Rename instead of writing directly to revoked file

Make the operation more atomic with multiple writers.

Closes-Bug: 1261554
Change-Id: I990a2ba28d9a2a1d01300dcd33266956d059afa3
Merge "Rename instead of writing directly to revoked file"