fix compile error of  getRandomObject in  map
and add srand to  vector and map
remove srand function call
Merge pull request #4820 from andyque/develop

fix compile error of Map's getRandomObject