documenting CodecSystem, ImmutableEnvironment, Knowledge Resource

as well as KnowledgeSource, plus some associated code fixes