Refs #360. Specced out a more-sane way of handling the rules for element nesting.

This is necessary to be able to change what the default root element
is on the fly, since p's and div's will need to be traded all over the
place.