Fix bug with stonewall option causing segfault

fio core dumped , with stonewall,

[global]
ioengine=libaio
direct=1
bs=8k
iodepth=1024
iodepth_batch=60
randrepeat=1
size=1024m
directory=/home/oracle
[job1]
rw=randread
filename=file1
[job2]
rw=randwrite
filename=file1

stonewall

[job3]
rw=randread
filename=file1
[job4]
rw=randwrite
filename=file1

 >fio myjob
job1: (g=0): rw=randread, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
job2: (g=1): rw=randwrite, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
job3: (g=1): rw=randread, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
job4: (g=1): rw=randwrite, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024
Starting 4 processes
Quit (core dumped)PP] [99.3% done] [  1298/     0 kb/s] [eta 00m:03s]

(gdb) bt
t_rate=0xfeeee790, m_rate=0xfeeee794) at fio.c:1011

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 89cc599..edc6b49 100644
--- a/fio.c
+++ b/fio.c
@@ -990,6 +990,7 @@
 		/*
 		 * thread is not dead, continue
 		 */
+		pending++;
 		continue;
 reaped:
 		if (td->o.use_thread) {
@@ -1002,6 +1003,7 @@
 		(*nr_running)--;
 		(*m_rate) -= td->o.ratemin;
 		(*t_rate) -= td->o.rate;
+		pending--;
 
 		if (td->error)
 			exit_value++;