Use lastIndexOf instead of indexOf in Node.prototype.removeChild

The fastest method to remove all children of an element is to loop through all its childNodes in reverse,
because this avoids renumbering the array.
Using lastIndexOf makes this removing all children slightly faster: O(n) instead of O(n^2)