Find all MIME types groups present in the media database.

This code snippet groups all media on the device by MIME type and prints to the console all groups found. It means only groups which have at least one member (a file of a given MIME type) will be printed.