Replace RefCounter with a smart pointer

Replaced ```RefCounter``` class with a smart pointer like ```std::shared_ptr``` to get rid of  complicated ref/deref operations.
This patch is almost equivalent to #140 for taglib2 branch.