[PATCH v7 11/22] perf tools: Add functions to allocate and free queues