Port Facebook middleware from Katana.

Depends on https://github.com/aspnet/HttpAbstractions/pull/113
TODO: CoreCLR WinHttpHandler does not yet support custom server cert validation.
Should we have an AuthenticationFailed event like we have in WsFed and openidc?