WFCORE-63 prepare for unified list serialization until we get new core release

This is to make sure https://github.com/wildfly/wildfly-core/pull/261 doesn't fail full build. 
After new core release this code can get greatly simplifed