Fix #640. Update cluster config to track the last used shard id and incr...

...ement for new ones