Instead of loading and deserializing the transaction, we store the
stakeholders in tables contract_signatories and contract_observers.
To avoid having to do an extra roundtrip for fetching the stakeholders,
we aggregate the parties at query time into a % separated string (% is
not a valid character for parties), which we then split again in the
application.
Fixes#2330.