Call onRemoval of shard IdCache during clear.

This looks like a copy/paste issue where onCached was being called
rather than onRemoval. This should fix the ID cache stats not being
correct after a call to /_cache/clear?id_cache=true
Added test for verifying the id cache size if the clear cache api is invoked.