rpc: Avoid creating non-standard raw transactions (MarcoFalke)
Pull request description:
Multiple OP_RETURN outputs in a transaction are not standard and unlikely to be relayed, so avoid creating them. Apart from that, the logic was broken in that it duplicated the same hex-data for each data output: Closes #14868.
https://github.com/bitcoin/bitcoin/pull/14890/commits/fa4c8679ed94f215ce895938f7c3c169a2ce101e
Backport of Core PR14890