An in-memory backend for integration tests.
It keeps a mirror of the native tree like a real backend would, validates
every command against the protocol (panicking on violations), and measures
text with fixed, platform-independent metrics so layouts are deterministic:
each character is 0.5em wide and lines are 1.25em tall.