RESTEASY-907 - fix memory leak

This fix is ugly but does its job, all classes in question should be revisited and properly fixed