Merged the Smartpointer and ThreadSafeSmartpointer into one.

The dinstinction is now made through templates by specifying the mutex type
which will be used by the smartpointers for that object.