observeKeyPath: block now receives the type of object it is observing.

This is done by wrapping the block provided by the callee in another
block that does the cast to avoid the ObjC-hates-generics-in-Swift
problem.