common/PrioritizedQueue: check queues in highest-to-lowest order

If there are multiple queues with sufficient tokens, we currently
always choose the lowest-priority queue.  This seems like the opposite
of what we want, particularly given that dequeue is stateless and will
allow a low-priority queue with surplus tokens to 'starve' a higher-
priority queue.

Signed-off-by: Sage Weil <sage@inktank.com>
common/PrioritizedQueue: buckets -> tokens

Signed-off-by: Sage Weil <sage@inktank.com>
common/PrioritizedQueue: add min cost, max tokens per bucket

Two problems.

First, we need to cap the tokens per bucket.  Otherwise, a stream of
items at one priority over time will indefinitely inflate the tokens
available at another priority.  The cap should represent how "bursty"
we allow a given bucket to be.  Start with 4MB for now.

Second, set a floor on the item cost.  Otherwise, we can have an
infinite queue of 0 cost items that start over queues.  More
realistically, we need to balance the overhead of processing small items
with the cost of large items.  I.e., a 4 KB item is not 1/1000th as
expensive as a 4MB item.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: simplify asok to single callback

Signed-off-by: Sage Weil <sage@inktank.com>
common/PrioritizedQueue: dump state to Formatter

Signed-off-by: Sage Weil <sage@inktank.com>
osd: dump op priority queue state via admin socket

Signed-off-by: Sage Weil <sage@inktank.com>