Performance optimizations

Hi, @lennartkoopmann
I'm currently trying to setup centralized logs aggregation for our proxy service using Graylog2.
I have very little experience with Java, but I've run against several major performance issues, so I've profiled Graylog2 and patched it. Could you review these patches?

Thanks in advance.