refactor(library/tactic): use unprotect/protect idiom for callbacks in the tactic API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(library/tactic): use unprotect/protect idiom for callbacks in the tactic API