Plugin: improve performance when accessing thread global event list

Signed-off-by: Eduardo Silva <eduardo@monkey.io>