Materials: Per-context animation states

Completed plumbing work to allow each material variant instance to
be animated independently, according to their usage context. Among
other things, this now means that materials used with UI displays
(such as the control panel and console) are no longer paused when
the client pauses the game.

Plus minor cleanup.