Split out global.h code; Added supernode_iterate();

1. Split out ctx_alloc, ctx_assert, ctx_output
src/basic/ctx_alloc.c: wrappers for malloc, calloc etc
src/basic/ctx_assert.c: wrappers for assert and family
src/basic/ctx_output.c: status output functions

2. Added supernodes_interate() function to supernodes.h
- used in clean_graph.c: cleaning_get_threshold() and clean_graph()
- used in supernodes.c: supernode_write_len_distrib()

3. Fixed bugs in parsing arguments in ctx_thread

Bugs caught by Kiran (@kvg)