Primary data-stream refactor

Changed the determineDSIDAndMimetype functionality to use the derivatives hook to get the primary data-stream on a collection basis.