Add process ID parameter to get_process_state and process_state_changed

The naming scheme would require to name it process_id, but this name is
already used of the object ID of a process object. Change the naming
scheme instead and rename user_id and group_id to uid and gid, so the
process ID can be named pid.