Python 3 compatibility in TestJsonUtil.test_regex.

Removing "compile_re" means that Python 2 and 3 no longer behave differently,
remove test code that was specific to Python 3.
Unused import