Remove dead code and polyfill for containsElement.

This is not used since the metal-views merge.