Switch to Mutation observers instead of DOMNodeRemoved

This is an attempt to switch from the deprecated DOMNodeRemoved to Mutation Observers.

I'm well aware of how hairy those nested for-loops look and I hope we can come up with a better approach, but this is what I have so far.

I encountered issues with the DOMNodeRemoved event being fired on non-element nodes (using Foundation in a dynamic DOM), which caused errors in Sizzle (https://github.com/jquery/sizzle/pull/256) and jQuery (https://github.com/jquery/jquery/pull/1558). The consensus there seems to be that DOMNodeRemoved is deprecated and this code will break (it already has, in fact) sooner or later.

One outstanding issue is the fact that it doesn't replace the DOMAttrModified functionality of the existing code, because I'm not quite sure how to keep performance while adding a few more loops, as this is already pushing it in many ways.