introduce sort_pairs for ordered table iteration

sort_pairs is purposed for ordered table iteration,
if only one argument is given, it will use default
compare function <example 1>, otherwise, it use
closure function given by user like <example 2>.

Example 1:
	for (k, v in sort_pairs(s)) {
		print(k)
		print(v)
	}

Example 2:
	function cmp(v1, v2) {
		return (v1 > v2))
	}
	for (k, v in sort_pairs(s, cmp)) {
		print(k)
		print(v)
	}

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
use sort_pairs in stack_profile.kp

dump the stack profile data in ordered format.

Signed-off-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>