ISPN-3736 Backport to 5.2.x for EAP 6.3

https://issues.jboss.org/browse/ISPN-3736

Included are fixes for ISPN-3055, ISPN-2995, ISPN-3124, ISPN-3178, and ISPN-3556. For ISPN-3178, I copied the latest CHMV8 sources from the master branch.

Some of the issues mentioned in ISPN-3736 were already present in the 5.2.x branch: ISPN-2825, , ISPN-2713, ISPN-2589, ISPN-2935, ISPN-2910, ISPN-2966.

I was not able to backport ISPN-3443, it would require other fixes to be backported (e.g. ISPN-2840), and the code has changed too much between master and 5.2.x with the introduction of external metadata to make this feasible.