Do not consider deleted labels in ambiguity check
This adds a new (boolean) parameter "active" to the label cache, where
we track whether a label is deleted in ct mode (the same could be done,
if wanted, for labels in notes and inactive branches).
Deleted (inactive) labels are neither considered in the uniqueness check
nor added to the outliner. This also means that undeleted references to
deleted labels are now (correctly) marked as BROKEN.
Cherry-picked from:
[
3ae6bff538/lyxgit]
[
a550a613e8/lyxgit]
[
c457ea90e/lyxgit]
[
5cfd25697/lyxgit]
[
5afacb144/lyxgit]
[
54366c38e/lyxgit]
Fixes: #6563