Optimized countManhattanDistance function. Reorganized and updated distance functions. PT version is faster than normal. AVX & SSE versions work correctly.