Unregister notification handlers when ax elements are destroyed.

This fixes an obnoxious memory leak where the handlers would capture element
references and they were never removed so the elements would just hang around
indefinitely.