Port fixes for #1476
Port fixes for #1531
Fixes #1530
Prevent Servlet 2.5 to crash
jersey: Use AtmosphereObjectFactory when instantiating AtmosphereResourceEventListeners