use shared pointers in simple pairwise potential
add shared pointers to frozen atom potential
use std::make_shared
quiet compiler warnings
fix some bugs in the c++ tests.

these were discovered with valgrind
Merge pull request #26 from js850/shared_ptr

use std::shared_ptr in the c++ backend

also do some c++ clean up and fix a few c++ test bugs

There are a few more places where we should use shared pointers.