Cleanup and gate on hacking E711 and E712 rule

Fix the offending instances of the rule
and removes it from the ignore list in tox.ini
so that we can gate on E711 and E712 rules.

Most violations were in DB queries. Replace as follows:
  False -> sqlalchemy.sql.false()
  None  -> sqlalchemy.sql.null()
  True  -> sqlalchemy.sql.true()

Change-Id: Id84aa04697d1b3c23dc03195113e296c6715379d
Merge "Cleanup and gate on hacking E711 and E712 rule"