Get rid of state.activeTemplateId from the serializer.

* Skip over encapsulated content whenever they are encountered
  since original/edited tranclusion/extension source is emitted
  directly on hitting the first node.

* This cleans up the WTS code some more.

* No change in parser tests (as it should be).

Change-Id: Idadac148438b70019b8c9a9f345f5e1aa3c75083
Merge "Get rid of state.activeTemplateId from the serializer."