Allow the AI to look for more space to build

fixing #3569, the AI choose only places where it is near the base (reverting d08d3d6 from #3143) and fixing a bug that if the place that AI finds to build is not near the base, it stops looking for more places. now it continues to find more