Shuffle shared cache cleanup code to be clearer..

Will hopefully resolve Coverity report 1129036:
Missing unlock (LOCK)
24. missing_unlock: Returning without unlocking
"__wt_process.cache_pool->cache_pool_lock.lock".

Though I don't see how the unlock could be missed.