Fix post-receive hooks with reference transactions
There's two bugs in the post-receive hook implementation in combination with reference-transaction hooks:
- The primary-flag isn't respected in case the Go post-receive hook implementation is used. It's hidden behind a feature flag and thus isn't the offender here, as that flag is disabled.
- The primary-flag isn't passed through to the post-receive hook at all. This is most likely the isuse here, as we'll consider any node a primary in case no transaction is going on.
This MR fixes both issues.