List all media items grouped by MIME types.

This code snippet groups all media on the device by MIME type and prints to the console all members of each group.