doc: convert refcounting directive to a class
doc: convert refcounting directive to a class

Directive functions are no longer supported in Sphinx-3.0
but directive classes have been supported since early 1.x

akheron/jansson,akheron/jansson,bstarynk/jansson,markalanj/jansson,Mephistophiles/jansson,markalanj/jansson,bstarynk/jansson,akheron/jansson,markalanj/jansson,Mephistophiles/jansson,bstarynk/jansson