BUG: Explicitly close Tee in AssertPrints and AssertNotPrints
BUG: Explicitly close Tee in AssertPrints and AssertNotPrints

Fixes a test failure caused by the Tee object being lazily closed only
when an AssertPrints/AssertNotPrints object is garbage collected.

ipython/ipython,ipython/ipython