Write changes in decoder_raw only if there is something to write

OutputPluginPrepareWrite and OutputPluginWrite were being called even
if there were no DML changes, resulting in useless and empty changes sent
to the client. This is more an improvement than a bug though.

Regression tests are added to cover include-transaction=off as well.