AvailableCoins() now acquires cs_main lock

It's required when called from listunspent() which doesn't acquire locks (unlike via SelectCoins() which does).

Rebased-From: ea3acaf