fix(frontends/lean/pp): compute local shared nodes, and avoid unnecessary let's

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