Generic model/file update propagation.

This is a mirroring work-in-progress -- shouldn't affect live code, except for a tweak to view_count referrer checking.

The idea here is to propagate changes to mirrors using generic "update this model" and "fetch this media file" messages, so the mirroring code is totally independent of the underlying data model. Requires more docs/testing, and authentication checks, but seems to work.