util: add list_sort()

This function sort the list, taken from linux kernel.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
collie/trace: add graph stat function

This is useful to get how much time each function takes during the trace.

$ collie trace graph stat
   Total (s)   Per Call (ms)   Calls   Name
   100.659       51.356         1960   eventfd_xread
    79.315       68.790         1153   do_process_work
    76.645      348.388          220   do_push_object
    76.637      348.349          220   push_cache_object
    74.611      185.139          403   gateway_create_and_write_obj
    74.338      345.757          215   exec_local_req
    74.276      350.361          212   gateway_forward_request
    35.555       34.722         1024   xpwrite
    35.547        7.119         4993   event_loop
    35.538        7.118         4993   do_event_loop
    34.299      385.380           89   sheep_do_op_work
    33.778      427.565           79   peer_create_and_write_obj
    33.776      427.547           79   default_create_and_write
    26.324     2632.399           10   object_cache_push
    26.259     2917.706            9   do_background_push
     2.525        2.701          935   object_cache_handle_request
...

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
collie/trace: use macro for the width of thread name

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
tests/func: add common header to tests

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
tests/func: add _vdi_list helper

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
tests/func: fix 068 so that _vdi_list different node in the loop

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>