some fixes for conf_fixtures
fix db tests

minor cleanup of db/sqlalchemy/api

- s/ is None/ == None/
- s/ is not None/ != None/
- remote unused retry_on_deadlock method