2.4 - performance dissipation due to avoidable FPU-divides (Feature #2488)

I did some optimization (same result in tests), so it can go into 2.4.
1. added const qualifier for parameters and variables. (MISRA/QAC)
2. reduced calloc() in epilines.cpp to avoid memory fragmentation
3. lot of faster math: x==sqrt(x)*sqrt(x), log(sqrt(x))==log(x)*0.5, sqrt(a)<sqrt(b)==a<b, a/b==a*(1/b)