Refactor vmlCreate() so that it does not expose closure to `TypeError` (#7279)
Refactor vmlCreate() so that it does not expose closure to `TypeError` (#7279)

when `document.namespaces.add()` throws `TypeError: Cannot read property
'add' of undefined`.
* I am not sure why Google Chrome does not garbage collect this
  TypeError because clearly it is not used in the returned fn. But if
  you look at memory Heap snapshot, you can see it persists after
  garbage collection.
  * Try it with any leaflet map such as https://leafletjs.com/ and
    search heap snapshot for 'TypeError'
* With this change, the `TypeError` is garbage collected and not in
  memory heap snapshot.
CapeSepias/Leaflet,Leaflet/Leaflet,CapeSepias/Leaflet,Leaflet/Leaflet,CapeSepias/Leaflet,Leaflet/Leaflet