Write hex directly to the textWriter instead of creating a string.
Fixed issues with LongPollingTransport not sending response for timeouts/disconnects.
- Fixed cursor writing for '0'.
- Added Terminal to PersistentResponse so that teh LongPollingTransport
  can determine if it needs to end the request.
- Add some delegate caching to the LongPollingTransport.