distanceSq() was broken! also banished some sqrt()

seriously, distanceSq()
I can't even

also added MAX_VIEW_DISTANCE check to survey...() function for better AND
faster AI