Remove 'with' statements

Summary:
    Turned out with statment and database.py are not compatible

Test Plan: psyduck

Reviewers: adam, alex, anders, ankur, arthur, chase, dolphinigle, jvictor, manu, marko, mom, nika, nikita, pieguy, rumen

CC: engineering

Maniphest Tasks: