refactor codec and transport guice modules to use a shared superclass with helper methods