Convert characters '&', '<' and '>' to entities and back when removing and reinserting the CDATA elements.

If the string between the CDATA elements contain entities, the indent will fail as they don't currently get converted to xml entities.
This commit will create entities where needed and also remove them again when the CDATA elements are reinserted after the indent.