Superset of #10559
This removes the possibility for GetCoin/HaveCoin/HaveCoinInCache to return true
while the respective coin is spent. By doing it across all calls, some extra checks can be eliminated.
coins_tests is modified to call HaveCoin sometimes before and sometimes after AccessCoin. A further change is needed because the semantics for GetCoin slightly changed, causing a pruned entry in the parent cache to not be pulled into the child in FetchCoin.