+htp #15922 import FileAndResourceDirectives from spray

Based on #16183 + #16195. So, please review just the last commit. I will rebase once the other PRs are merged.

Fixes #15922.

/cc @sirthias @hseeberger
I thought that we where talking about the compiler complaining that it had inserted `()` around some arguments automatically to group them "correctly". If that's what we are talking about then that can be done by hand in the code as well.