breacharbiter: fix flaky race condition in test
breacharbiter: fix flaky race condition in test

This fixes a possible race condition during TestBreachSpends that could
cause the test to fail in a flaky way.

The error returned in PublishTransaction (publErr) could be modified by
the main test goroutine before PublishTransaction had a chance to
return, causing the wrong error value to be returned.

This was mostly visible as a flake during TestBreachSpends/all_spends
where adding a one second delay in the old code between the send in
publTx and the call to publMtx.Lock() would cause the last iteration of
the test loop to fail.

This is fixed by moving the lock and locally storing the expected error
value to before the send so that each call to PublishTransaction is
guaranteed to return the correct error value.

LightningNetwork/lnd,aakselrod/lnd,LightningNetwork/lnd,aakselrod/lnd