Allow element.contains() to accept a Node

This fixes issue #470