Fix leak in leak detection code

If ensure_clean_request_context found a leak, it would raise an
AssertionError and not clean up the leak, and therefore affect other
testcases.
Merge pull request #739 from untitaker/sprint-branch

Fix leak in leak detection code