OF-1917: Work with cyclic dependencies in shared groups.
In order to avoid a stack overflow, this code first 'flattens' the set of dependent shared groups, before processing them.
OF-1912: Stop using proprietary sun.security.x509.GeneralNameInterface
The implementation is used only for one constant definition. We can copy the constant value in our code, instead of depending on proprietary code.