+htp #15910 import coding infrastructure from spray

Fixes #15910.

This still needs some tests but the implementation is itself is ready to be reviewed.
you are not using akka.stream.impl.ErrorPublisher because you want it to fail when requested, and not when subscribed?