BUG-2459: use thread-local cache of transformers

As it turns out, we can reuse transformers in the encode path. Do
precisely that, keeping them in thread-local variables. This is safe in
context of Netty, as we are invoked only from the netty threadpool. This
has the benefit of reusing the transformers across all sessions
associated with the threadpool.

Change-Id: If57933f68a9c9196b649baea17353fd2bd472e09
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-2459: use thread-local cache of transformers"