avoid some false-positive from the static analyzer

and remove some code repetitions while refactoring the shardcache_client_(get|set)_multi()
implementation