added _.collate method & associated tests
minor fixes to _.collate; matched formatting to underscore style