trunk-tracking: use System and support cache flushing

Use SystemRewriteDriverFactory.
Use SystemServerContext.
Wire up FlushCacheIfNecessary().
Port cache flushing tests.