perf: mark the types of added declarations as persistent

This PR marks the type of each declaration as persistent when it is added to the environment, so that elaboration and kernel checking on multiple threads no longer contend on the reference counts of these terms. The new option `Elab.persistentSignatures` controls this; the language server turns it off by default, as it adds declarations again on every edit.

The types are marked in `addDecl`, including the types of the constants the kernel generates for inductive types, and when the signature of a theorem is committed before its proof is elaborated.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3 files changed