Move several unit tests for algorithms from meas_algorithms.
Bugfixes found while doing DM-1456.  They originated in DM-1467