Remove unneeded qp*_ref/unref and qpcache_ref/unref calls by skipping
the extra ref/unref on the database in qp*node_release(). This makes
the extra ref/unref in detachnode() unnecessary as the reference on the
database will always only go down when releasing the database nodes.