tests: call session.close() after every test case

This is an attempt at reducing the overall memory consumption of the
test process when running the full test suite.

Change-Id: I0fc5f3f7116cb1f85a685399fe8b804808be805d