shardcache_get_nodes() now returns a 'disposable' copy of the shards array

this is safer since if a migration is in progress the shards array can be switched with the
new one anytime. Apart returning a copy it's also necessary to hold the migration_lock
while actually making the copy
The returned list is now a copy and needs to be freed