More specific weight test
Allow tag 0

Unlikely this will ever be used in HTML, but there may be some
valid use cases in XML
Add a stable sorting algorithm

Since PHP 4.1.0 all sorts are implemented using quicksort which
is not stable - this messes with all sorts of ordering.

Here I take a mergesort from the php manual's comments section to
force a stable sort on the #weight property
Add support for emitting raw strings from render arrays

Sometimes you want to weight a plain string or preprocess it with
callbacks. If you wrap a plain string in a render array it will
always be enclosed in tags of some sort.

While you could write a callback that returns the #in value, or
set the #tag to something benign and inline like "span", this is
extra work compared to simply adding a #raw element which is
returned regardless of the state of the array.