Add a friend class which tries to call copy constructor and assign operator.

In C++98, this will cause link errors. In C++11, this will cause compile errors
when deleted and defaulted functions are used.