Adding support for flush points in Razor pages

Fixes #1042
nits: add a `using` for System.Threading.Thread and change `1000` to `TimeSpan.FromSeconds(1)`