Fixed bug with folding content nodes

First bug would be that nodes would only be folded once. Second bug is
that they would lose their type, and the third bug is that the child
nodes weren't folded. All three are fixed now, and both ContentNode and
Node have been marked as abstract to prevent similar problems in the
future