factored out the dict-like behaviour (and added sorting behaviour) from SourceCollection and OutputCollection to LDPDocumentCollection