Better support for use within OSGi.

Due to OSGi class loading JUnit is unable to preserve the API contract
when running within OSGi. This fix makes getShortTestClassName() work,
however getTestClass() still returns null within OSGi. This is the same
fix as in
https://github.com/bmuskalla/junit-benchmarks/tree/osgiManifest but
without the OSGi manifest.

Related issue: https://github.com/junit-team/junit/issues/364