checkTheme

Find icons that belong to themes.

Uses prefixes when prefix is true, otherwise suffixes. Longer keys take precedence; an empty key matches all remaining icons. Returns valid, mapping each theme key to icon names, and invalid, listing icons that match no theme.