stomp: Fixed several memory leaks.

Scratch buffer wasn't released, when driver was not connected,
and we leaked strings during header parsing.