move signal for EVENT_BUGNOTE_DELETED into core api

This ensure that the bugnote event is triggered whenever
a bugnote is deleted, including from SOAP api calls
Travis is also complaining about an undefined variable ;-)