Changes to support PageExecutionContext (Browser Link) in Razor

Fixes #1083
when measuring perf we could consider an if statement around the begin context call.