core: omit empty or irrelevant fields on tx
core: omit empty or irrelevant fields on tx

Multiple fields on annotated inputs and outputs should be omitted if
they are empty or nil.

Closes chain/chainprv#1798

Closes chain/chainprv#1806

chain/chain,chain/chain,chain/chain,chain/chain,chain/chain,chain/chain