[GEOS-6627]GWC causes a wrong handling of the ImageIO and ImageIO-Ext plugins (Backport on 2.6.x branch)

Please look at the following JIRA: https://jira.codehaus.org/browse/GEOS-6627. Note that the following pull request requires that the https://github.com/GeoWebCache/geowebcache/pull/272 pull request has been already merged in GWC.