jsonrpc: Check for credit before popping a message from the queue

Change-Id: I0ad34b3b1125143ac1e3f6185359d49ec74bd8ee
Signed-off-by: Saggi Mizrahi <smizrahi@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/11622
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>