Make `StaticResource` and `DynamicResource` automatically convert `Color`s to `ImmutableSolidColorBrush`es and add a `ColorToBrushConverter` for use by bindings.
To do this I made `GetResourceObservable` accept an optional conversion function.
`SelectionModel` can have a selection set before its `Source` is initialized. In this case, be sure to trim invalid selections from the model before continuing.
Fixes#3919
`Changing_Resource_In_Templated_Parent_Should_Affect_Templated_Child` now fails because resource changed messages no longer traverse into templated children.
Instead of each control listening to its parent `ResourcesChanged` event, use the logical tree to propagate `ResourcesChanged` events:
- When attaching to the logical tree, piggyback on the `AttachedToLogicalTree` traversal
- At other times, propagate by calling `NotifyResourcesChanged`
Split resource nodes into two types:
- `IResourceHost` represents controls and `Application`
- `IResourceProvider` represents resource dictionaries and styles, these are owned by `IResourceHost`s
Dynamic resources are now always resolved from an `IResourceHost`: if an `IResourceProvider` doesn't have a host then a dynamic resource in the resource provider will not be resolved. Resource providers no longer have a `ResourcesChanged` event, instead they notify their `IResourceHost` owner of a resource change by calling the `NotifyHostedResourcesChanged` method.