Replace Optional[X] with X | None and typing.Dict with builtin dict
throughout the module. Add "from __future__ import annotations" to
enable deferred evaluation, removing all quoted forward references.
Add missing return type annotations to __setitem__(), parent, root,
set(), get(), value(), and name. Remove Optional and Dict from the
typing import since cast() is the only runtime typing helper needed.
Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v
Signed-off-by: Jan Lindemann <jan@janware.com>