use thread locals in KryoService

I'm not sure if the bug I'm hitting with carbonite is fixed by this PR or not, but since Kryo isn't thread-safe, it's probably best to use thread locals.