Cache ModeDetector values.

This PR changes the `ModeDetector` to cache the value when calculated. `ModeDetector` is called very frequently, especially with the changes made in https://github.com/reactiveui/ReactiveUI/pull/705.

The `ModeDetector` can also get very slow when it is accessed from a background thread and starts throwing exceptions. This really adds up and hurts performance and is a common scenario with `ToProperty` in RxUI.