Sort keys when formatting tables

It is helpful to have keys sorted in formatted tables when comparing expected and actual tables. The order is:

* Array-part keys (integers in range 1 .. \#t);
* Other number keys sorted by value;
* `true` and `false` keys;
* String keys sorted by value;
* Other keys sorted by type.