Tests raise exception if logging problem

If there's a problem with the log call then the tests should catch
it.

Related-Bug: #1366988
Change-Id: Ied3f329902ca1088ebfcd163edd2cef797ba90a2
Prevent infinite loop in token_flush

If there were > batch_size tokens with the same expiration time then
token_flush could hang because it picks the expiration time as the
target to delete with a < check.

The check is changed to a <= so that the tokens in the batch are
deleted so that token_flush always makes progress.

Change-Id: Id0b6f7fcdf7ebb02a6f38fbb9a4e25bf714a614c
Closes-Bug: #1387401
Enable hacking rule H904

H904 Wrap long lines in parentheses instead of a backslash

Change-Id: Ifc1ff3acd07c63fecb0e3482ae6683bcf3e18cb2
Merge "Tests raise exception if logging problem"
Merge "Prevent infinite loop in token_flush"
Merge "Enable hacking rule H904"