Multi-Content Revisions/Derived slots

Derived slots are an an addition to MCR that would allow information that is derived from the content of a page (or more precisely, from the content of the slots of a revision) to be stored alongside that content (as part of the same revision), even if the derived content is generated asynchronously or updated later on.

Derived slots would work much like regular slots, with a few important differences:


 * their size is not included in the revision size, and their hash does not contribute to the revision's hash.
 * they can be updated at any time, using a new  method that lives alongside.
 * updating a derived slot is a destructive operation, the previous content of that slot (on the same revision) is lost.
 * updating derived slots is transparent for users. No entry is generated in the revision history or in RecentChanges or on the watchlist. The update is a purely technical operation, not an event from the perspective of the user.
 * If a derived slot is updated for the current revision of a page, this would however cause the page to be re-rendered (perhaps we want to make this optional), and derived page data (such as entries in the links tables) to be regenerated, similar to the way pages get rerendered when a template changes.
 * Derived slots should not show in diff views, at least not per default. The purpose of a diff view is to show what a user changed.

Derived slots could be implemented based on the existing system without much effort. All that would be needed is:


 * Add a flag to the  class.
 * Add  alongside.
 * Adjust code in RevisionRecord, RevisionSlots, and SlotRecord to be aware of derived slots and handle them properly when calculating the size and hash of a revision.
 * Make DifferenceEngine aware of derived slots, so they can be excluded from the view.

Note that no schema change would be needed, since the distinction would be entirely programmatic. If for some reason the database needs to know which slot is derived, this could trivially be added to the slot_roles table. Since this table is very small, the schema change would be easy.