When a bar button item with a custom view is provided to the button bar, the custom view is used in place of an MDCButton instance. 6ec9f334f0e093e1d2bf04165895ca725455150e introduced a change that unconditionally called a UIButton API on the views when the tintColor was changed, resulting in a crash when a custom view was used.
This change adds a test that, prior to this fix in this change, crashed, but after the fix included in this change now passes.
Upon inspection of the culprit code, it was revealed that image and title similarly could result in crashes, so those crashes have been fixed as part of this change as well.
Closes https://github.com/material-components/material-components-ios/issues/9760