ammendments by Robert Osfield, adding get/setSharedStateManager() methods into osgDB::Registry, and clean up fixes in SharedStateManager for the StateSet arrays.