Nonlocal scalar quantum field theory from causal sets