unique_ptr

Replaced all shared_ptr instances with unique_ptr; we chose to implement
thread safety by using reentrant methods rather than resource
synchronization, thus negating the need for shared_ptrs.