builtin/apply: move 'whitespace_error' global into 'struct apply_state'