[CXF-6115] Protecting CachedOutputStream against infinite loops when it works with Transferable streams - patch from Kyle Lape applied - This closes #32