refs #465: only put <P> element around orphaned media/image elements

We were unconditionally creating a <p> wrapper when we "deactivated" within the image plugin.  Added a check to make sure a legal parent for the media/image was missing, before adding the <p> wrapper.