Add server-side support for `Expect: 100-continue`, other improvements

This PR improves a number of things in akka-http-core and adds server-side support for `Expect: 100-continue` (#15799).

The client-side support depends on #16336 and is therefore postponed for the time being.
Maybe. But the request entity stream is not necessarily flatmapped into the response stream.
The default behavior should be to simply complete the response stream in the presence of entity issues, which will render an "appropriate" error response. We'll have to see how this will work out in practice...

--
Sent from the road, so please excuse the occasional bump...

> On 25.11.2014, at 17:44, Roland Kuhn <notifications@github.com> wrote:
> 
> In akka-http-core/src/main/scala/akka/http/engine/server/HttpServerPipeline.scala:
> 
> >        }
> >  
> > -      def dispatch(requestStart: RequestStart, response: HttpResponse): ResponseRenderingContext = {
> > -        import requestStart._
> > -        ResponseRenderingContext(response, method, protocol, closeAfterResponseCompletion)
> > +      val readBypass = State[Any](Read(bypassInput))(handleMessageStart)
> > +
> > +      def waitingForResponseOrStreamError(requestStart: RequestStart): State[Any] =
> > +        State[Any](ReadAny(bypassInput, oneHundredContinueInput, applicationInput)) {
> > +          case (ctx, _, response: HttpResponse)         ⇒ sendResponse(ctx, requestStart, response, readBypass)
> > +          case (ctx, _, nextMessageStart: MessageStart) ⇒ waitingForResponse(requestStart, nextMessageStart)
> Yes, this sounds good. The default case will then probably be that the request entity stream’s error will propagate and a 500 is sent, but that’s fair since the server did not care enough to do something else.
> 
> —
> Reply to this email directly or view it on GitHub.
>