Some end-of-life tweaks for exec-port.
Added a shutdown command that terminate() sends in order to cleanly terminate exec-port.
Send a shutdown message to exec-port and wait for it to exit.
Merge branch 'application_stop_fix' into make_mac_compile_hack

Conflicts:
	c_src/exec.cpp