Replace manually-deleted owning raw pointers with std::unique_ptr (#763)
Twelve classes held a heap object by raw pointer and freed it with an
explicit `delete` in their destructor. This holds each in a
`std::unique_ptr` instead, so ownership is expressed in the type and the
destructors stop hand-managing memory.