Compile patterns only once

Using compiled patterns is a lot faster than recompiling the filters at every LoggingEvent.