Fix Jira TDS-407

The HTTPSession.sessionlist is intended to only be used during JUnit
tests.  This is because JUnit runs all of its tests in a single JVM and
between tests, unclosed HTTPSession instances need to be cleared out.

Since this functionality is still needed, the code has been modified it
to make it conditional on a static testing flag.