LPS-38386 Add restricted overflow protected cache output stream and servlet response

This is step 1, more commits are on the way.
Please don't close the ticket. I will let you know when it is done.