JERSEY-2429: JDK8 support

I merged a subset of https://github.com/jersey/jersey/commit/411f767d3686ee494000741ee60f24419264679c into Jersey 1.x.

This fix works for me. Please review, test, and merge.

Please note I only merged JDK8-specific changes. I ignored localization and other enhancements, which you might want to also merge.