Multiple Icons Collapsed into a Single Icon
When a mesh item is expanded it is nice that we show an active material differently from the rest. But when that row is collapsed, so that one icon is used to represent multiple items (with a number), there is never a time when that icon should show as active.
So for example in the following image. The top portion, expanded, looks great. But when collapsed, as shown on the bottom, The material icon should not show as highlighted. Both items are not active, just one of the group, so showing the highlight adds nothing but visual confusion
Grease Pencil Layer Icons
Grease Pencil layers are showing active layers with a pencil icon, and the rest with a "dot" icon. This breaks with the way that we show active items elsewhere. This patch makes all layers shown as "pencil" but highlights active layer with a highlighted background.
Also when collapsing a row containing multiple grease pencil layers they did not collapse to a single icon like other Outliner items. Instead it shows all icons no matter how many.
The following image shows these issues. The current behavior is shown on top, with "Stroke.001" showing multiple icons on the row, all looking active. And all a "dot" and one pencil. "Suzanne" is expanded and shows three layers, all looking active with dots and a pencil.
The bottom shows how that looks after this patch is applied. "Stroke.001" properly collapsing and showing "5". Suzanne expanded shows three layers with one active.
Note that there is an additional problem with Grease pencil layers in that clicking on a layer in Outliner does not make that layer show as active in Properties. This patch does not fix that, nor hinder it.