Bug 1054410: Accommodate snippets with root tags w/o “snippet” class.

The JavaScript previously assumed that the parent element of the 
“snippet”-classed element had the metadata for a snippet, such as its
ID. Raw snippets may have an extra surrounding element for styling or
other reasons, and instead of mandating that the root element of a 
snippet be the snippet-classed element, this updates the JavaScript to
search for the closest parent element with the “snippet-metadata” class.
how about `while (metaParent && metaParent.classList.contains('snippet-metadata'))`?