core/asset: extract asset query function
core/asset: extract asset query function

lookupAsset and assetByClientToken both performed the same steps after
loading an asset record. These steps have been extracted so they can be
shared.

Closes chain/chainprv#1672
Reviewers: da39a3ee5e6b4b0d3255bfef95601890afd80709@bobg

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