Fix CacheException references in error messages

A regression in CacheExceptionFactory results in CacheException#toString
form to be included as the message of another CacheException. The
intention of the code was that sub-classes of CacheException do not
get wrapped, but the code was flawed.

Target: trunk
Request: 2.10
Request: 2.9
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: https://rb.dcache.org/r/7267/
(cherry picked from commit 3c6b4fa394248d55fa572f6130468e6b386ccd72)
Merge pull request #820 from gbehrmann/fix/2.9/rb7267

Fix CacheException references in error messages