[2.4/master] Change hostname verifier to use thread's classloader

Fixes https://github.com/playframework/playframework/issues/2779