[NFC] Refactor SuffixTree to use LLVM-style RTTI
Following guidelines in
https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html
This allows us to
* Quickly discern between leaf and internal nodes
* Be more idiomatic with the rest of LLVM
* Save some size on node structs
* Reduce the number of allocations (because end indices for internal nodes no
longer need to be pointers to be compatible with leaf nodes)
Also object orientify the code some more. This allows for more asserts and
checks.
This shouldn't impact code size on the MachineOutliner.
- All unit tests pass (outliner lit + llvm-unit)
- No code size changes on CTMark @ -Oz for AArch64