Fix two minor bugs in producer.go

 - Remove a second superfluous call to bp.flush when bp.flushNow is
   triggered.
 - Release delivery lock after use instead of deferring until end of
   function.
Merge pull request #82 from patricklucas/fix_two_minor_bugs

Fix two minor bugs in producer.go