Feature: maxViewDistance, maxViewDistanceAtDark moved into ruleset

Update of https://github.com/SupSuper/OpenXcom/pull/698
A bit rewritten.
Optimization of distanceSq() in case of 2D calculation. Performance of 3D calculation will not changed.