Use `shared_ptr` for quadrature, move `state` etc to `encap_sweeper` (2nd try).

This supercedes #110.