ISPN-2790 ReplCommandForwardingTest fails most of the time in CI

https://issues.jboss.org/browse/ISPN-2790
https://issues.jboss.org/browse/ISPN-2792

Add a log4j filter that allows TRACE messages only if the thread name
matches a regular expression.

Also add a shutdown hook to CompressedFileAppender to make it more likely
that the log file is properly terminated.