backport Ember.View#nearestOfType