Change implementation of process primitives

Change implementation of process primitives to be macros, rather then
functions, so it will be easier to control evaluation of passed process
arguments.