toArray with includedForeignObjects should not prefix the arrays of foreignObjects

Apply the key format in toArray also to foreignKey indices

Collections now get an root element when exported to xml, yaml, etc. for fixing naming of child elements in xml documents

Fixed csv parser
Merge pull request #651 from mpscholten/to-array-prefix

toArray with includedForeignObjects should not prefix the arrays of foreignObjects