Return 0 slot if no more slots available in the queues
This scenario happens with the loader oneshot for example. This loader deals with more
than 1 type of origins to ingest in the same queue. So the computation of that function
returned negative value [1]. Which is ultimately not possible to execute in sql [1].
This commits fixes that behavior. This also explicits that the function must return
positive values in its docstring.
[1]
... psycopg2.errors.InvalidRowCountInLimitClause: LIMIT must not be negative