event_server: increase the total number of tasks whenever a task gets ready.

In the new model of task dispatching, we no longer know the number of tasks in
advance. Therefore, we have to increase this number every time a new job is
available.
disco_web: avoid using pending in count.