refactor(frontends/lean/pp): replace dangerous frontend reference with a weak_ref to the environment

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(library/kernel_bindings): make sure that when a formatter is invoked and it has a reference to an environment object, we get a read-only lock to the environment object

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(frontends/lean/pp): replace weak_ref with a strong reference, add new function (lean_formatter) for creating a Lean object formatter in the Lua API

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