Add gc.collect() before asserting that any object is destroyed
Remove 'with' statement and strip dependency on pypandoc
Add one more gc.collect() call in doctest for the sake of correctness
Fix broken doctests on PyPy