CRM-14478 - Add generic API, "getrefcount"
CRM-14478 - CRM_Case_XMLRepository - Add getActivityReferenceCount(), getRelationshipReferenceCount()
CRM-14478 - Allow components and hooks to influence refcounts
CRM-14478 - Count references to activity-types and relationship-types in CiviCase XML