Added length/1 function to priority_queue API.