Properly deallocation of memory.
Merge pull request #170 from murrekatt/develop

Properly deallocation of memory
Fix gtest for "make distcheck" (tarball build).
Reinstate gtest internal dependency build.
Merge pull request #169 from randy-waterhouse/develop

Fix gtest for "make distcheck" (tarball build).