encoding: Support input-only and output-only converters Make it possible to open an encoding handler only for input or output. This avoids the creation of unnecessary converters. Should also fix #863.