core/query: index retired outputs
core/query: index retired outputs

Since the annotated_outputs table is also used for lookups on the
annotated_txs table, retired outputs should be indexed.

Closes #537

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