fair_queue: disallow zeroed shares.
fair_queue: disallow zeroed shares.

The value of 0 is an invalid value for shares. It is also dangerously
invalid, in the sense that due to way we calculate the cost of requests
it will add a NaN to the accumulator that will stay there forever - even
if the shares happen to be adjusted later.

Although we could just document it and expect the caller to verify that,
or even throw an exception, we can just as easily enforce in the
fair_queue that the minimum shares should be 1 instead of 0.

Classes tend to be well behaved with respect to its shares, which is why
we have never really felt the need for it. But once we start adjusting
shares that is an easy mistake to make.

Signed-off-by: Glauber Costa <7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>
Message-Id: <20171125042200.2075-1-7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>

cloudius-systems/seastar,dreamsxin/seastar,avikivity/seastar,syuu1228/seastar,scylladb/seastar,syuu1228/seastar,cloudius-systems/seastar,cloudius-systems/seastar,avikivity/seastar,scylladb/seastar,scylladb/seastar,dreamsxin/seastar,avikivity/seastar,syuu1228/seastar,dreamsxin/seastar