Use a single option to set encoder options.

Some internal reorganization was required. Codecs now all descend
from RootObject so we can destruct them through the virtual dtor.