Simplify Core Foundation memory management using RAII-style CFRef template class.