Fix bug where arguments to queue declare were ignored
Add warnings and fix errors raised
Remove CVS Id tags from the code
Only call the callback after all frames for the message  has been sent, rather than the first frame.
Refactor slightly, and preallocate a much larger buffer, as we hope that new chunks will be merged as well