Preparing code for writing out style sheets.
More saving WIP.

We now save pretty much every object (contents, their style runs and style sheets are now saved), however parts still need to save a lot of their properties (esp. the concrete parts, the base class only saves the ID so far). Also still need to handle the 'save as' case where we have to also copy the media.