Implemented AllowChunkedEncoding in self-host.
Some code cleanup.
Merge pull request #1108 from dot-i/selfhost-chunked-setting

Implemented AllowChunkedEncoding in self-host.