[Prototype] GC.add/remove Root/Range using treap instead of unsorted array.

Creating this PR for testing, comments, feedback, etc.
This is a rought first prototype which hasn't been polished yet (PRs to this PR are welcome though)
Note:
- Users of core.memory which depended on unspecified behaviour (such as calling addRange/addRoot with the same p parameter multiple times) may suffer breakage.
- Currently iterating over root/ranges uses the stack, it would be possible to use threaded nodes or parent pointers but I'm not convinced the trade off would be worth it.
- If traversing the tree each time we need to scan impacts performance, we could always create a cached array version of the tree (with a dirty flag) which updates the cache if dirty at scan time.