A factory to create OpenStruct objects from nested hashes and arrays