Fix race condition in workqueue test.

Failure seen at least once in about 150 test runs:

```
Queue with max size of 160 bytes and 3 max items
 couch_work_queue_tests:143: should_have_no_items_for_new_queue...ok
**error:{assertEqual_failed,[{module,couch_work_queue_tests},
                     {line,210},
                     {expression,"couch_work_queue : item_count ( Q )"},
                     {expected,3},
                     {value,2}]}
```

From

```
should_block_producer_on_full_queue_count({Q, Producer, _}) ->
    ...
    produce(Q, Producer, 20, false),
    ?assertEqual(3, couch_work_queue:item_count(Q)),
```

Race condition is: telling Producer to produce, not waiting
for queue size to be updated, and then immediately checking
item_count.

To make failure occur reliably insert timer:sleep(10) in
producer_loop after ```Parent ! {item, Ref, Item}``` line.

The fix is to wait for queue size to be updated by using
the wait mode for produce function.

COUCHDB-2848
1 file changed
tree: 6f360457320d0f5270df25a04baa409949a6bf6f
  1. include/
  2. priv/
  3. src/
  4. test/
  5. .gitignore
  6. .travis.yml
  7. LICENSE
  8. rebar.config.script