Implement functions in process.c

Implement process_wait and process_exit, rewrite start_process.
Passed some tests.