fix(frontends/lean/elaborator): memory leaks that only occur when compiling with clang++

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