feat(library/tactic/apply_tactic): improve apply_tactic

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>