pettycoin-gateway: record transactions after we've injected them.

Stupid bug keeps us reinjecting the same txs over and over!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pettycoin-gateway: clean up htable on freeing ctx.

Useful for testing for leaks under valgrind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pettycoin-gateway: simple test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>