Adds a new test for the deadlock found in JDK-8027670 and fixed in JDK-8029281. Reviewed-by: mchung
Fixes several race conditions in logging which have been at the root cause of intermittent test failures. Reviewed-by: mchung, plevart