red-brick: Merge get_process_state and get_process_exit_code

Also add process_state_changed callback.