Changes to support PageExecutionContext (Browser Link) in Razor

Fixes #1083
we said this is going away if we use a method directly in the generated code.