Import ParameterDirectives from spray

This builds on top of https://github.com/akka/akka/pull/16091, so you can ignore the first commit.
This pattern is used in several directives. What's the motivation behind this private `vals`s?