The zero'th index in the array is unused, so a priority queue of N elements
needs N+1 array slots. Fix the allocation.
Also fix the assertion in dt_pq_insert(): the assertion needs to be checked
after incrementing the count of items in the priority queue, otherwise it can
miss an overflow.
Reported by: CHERI
Sponsored by: Innovate UK