stlink: better handle target reset/events