Removed some redundant code relevant to RefCounter.

Removed some redundant code and useless CMake checks relevant to ```RefCounter``` class.
And added a CMake check automatically enables C++11 option if possible.