PERF: 15% speed improvement for registration

        After   Before
        18.72   23.63
        18.95   18.9
        19.75   23.65
        18.66   19.13
        17.49   24.93
Average 18.71   22.04  15% speed improvement
Stddev  0.810    2.81

Using small regression test from ANTs package as reference.

This patch also prefers initialization of accumulators
prior to loop running and to simplify conditionals
on the loops.

Change-Id: Ie4c5dbbfb8c2cf2835454661ccf41d4950f9c80a