Use WeakMap to map elements to View instances

Degrades back to using jQuery data() API when WeakMap is
unavailable.