[PATCH kernel-4.19 125/286] Intel: perf/x86/intel/uncore: Factor out box ref/unref functions