Release the flush lock if there is nothing to do.

Fixes the issue that all logging stops the first time _flush is called
and there is nothing to send.
Merge pull request #5 from mixlr/bug/flush_unlock

Release the flush lock if there is nothing to do.