Fix parsing gearman status

The current code has some parse errors with more complex gearman
function names (which can show up due to the way Jenkins constructs
maven jobs).

Also, switch the calculation to examine only queued jobs (total -
running) instead of trying to calculate a worker shortage (total -
workers).  The latter doesn't deal well with multiple jobs that
require workers of the same image (it incorrectly behaves as if
they are independent).  By only examining queued workers, the actual
relationship between multiple jobs that require workers from the
same image is manifested by the fact that if, together, all such
jobs exceed the demand, we will see jobs sitting in the queue.

In other words, the overall picture is now that nodepool should
have at least enough ready+building nodes to accomodate the number
of jobs for a given worker/image that gearman is waiting to run.

Change-Id: Ibc2990ed2c7aea37bd4c94e5387c80ef840afa83