Add BasicProcessor for non-mutating processing

After #583 I remembered I did a lot of similar work earlier in the year. That work was intended to reduce the number of `Sexps` that get created. In the end, though, it just wasn't significant enough to justify all the changes. But this is a smaller change that will be also helpful as I attempt to add copy-on-write `Sexp`s.

This change slightly reduces time spent indexing calls and max memory usage.