[foldcode addon] Make sure unfold event is always fired

Also adds parameters to a range's clear event.

Issue #1678
Issue #1679