Attempt to fix flaky users db security test

 * Reset _users db before and after use to avoid polluting other tests.

 * Use a common reset db and "wait for auth cache" helper function

 * Since we're testing chttpd auth don't bother also setting httpd
   authentication_db, that just stops and resets the local port httpd listener,
   but we're not testing backend auth.

 * Use a retry in login for security db to avoid flakiness
6 files changed