Porting razorpage perf improvements from codeplex-2119

These changes were worth 2-3% of execution time on a page that makes heavy
use of attribute writing.

Making the overloads for writing a string public should show a small
throughput increase for a typical razor page.
cr feedback
Issue #1081 - XML DataContract Formatter can fail to write when instance type != declaredType.

Adding Functional tests appropriately.
Fix for 1071: Output Formatters should be invoked for writing out the response.