move shutdown_process to utils/

* also make compile pass on linux
* json_object_foreach is not defined in jansson 2.2.1