Improved comments about single-argument env_t constructor.
Used a "pristine" env for secondary index evaluation in rget_cb_t::handle_pair.
Made comments about sindex env_t mention global optargs.
Moved env_t construction to compute_keys.

This makes it more obvious that the secondary index function is
evaluated within a pristine environment.
Added regression test for #2767.
Merge branch 'next' into sam_2767
Merge branch 'sam_2767' into next