Add stress test for opening/closing sessions (JAVA-432)

At line 75, the number of repetitions can be specified for this test. This allows for opening a lot of sessions without hitting the limit on "Too many open files".

Note that on my machine, specifying more than 2 repetitions causes the test to fail because of a connection issue.