Add tests for view lifecycle events and fix some broken corner cases

Fixes #903. The issue was just that the superview was detaching its event listeners before actually firing them.

I started trying to fix #902 by adding a `condition` function parameter to `propagateToSubviews` that would execute on each view before performing the action. I ran into the issue that we don't currently have a way to predict if the view is actually going to be inserted before firing `viewWillAppear`, and I can't think of an elegant solution :poop: 

@kristianpd @nsimmons