Merge JUnit support into master

This is follow up on #2656.

This PR merges commits from #2656 and moves WeakHashSet tests to junit (173e709) category.

Note: there are two more commits in this PR which are just artifacts of merging 2.10.x into master.