[utils] move MIN() macro to tp_misc.h
[js] string comparison: adapt tstr_cmp() to return relation between compared strings
[js] string comparison support
[js] array: add comparefn description
[js] Array.sort() should sort as strings by default