remove restart feature

add: threadnum config
add: msgctx control mask
add: stat collect and output
move: main() to seperate file
now reload will update link_opt_t