tests: Migrated refcnt.cc test from src/unitttest to a gtest