Add (basic) functionality for DEM refinement to CPM class

Known issues: stats are computed for (residual)=(dem.off)-(corr_opt.off). This can cause
confusion. However, dem offsets are deterministic, and these stats are valid, since they
represent stats of the stochastic component (corr_opt.off) of the residual.
Use getQuick() instead of get() on Trove arrays in CPM: no bounds check

Note: With getQuick(int offset) values are returned at specified
offset without doing any bounds check. Since I have the full control
of loops this makes sense, and speeds up things a bit.