observer: Allow handlers to be removed during notify.

Re: https://github.com/chfoo/wpull/commit/b12d77dd551c640a1f99c6ca4ac549e16dd6f533#commitcomment-6755015