Fix memory leak with appendedEls

The list of appended style elements `appendedEls` is never cleared, preventing the style elements from being garbage collected.

This change clears the list after the style elements have been removed from the DOM.