Add convergence check to all algorithms

Kicks in after 100 iterations by default, as the bounded ones are
showing non-monotonic convergence (which is a bug in the Bohning case,
clearly).

Also eliminated some copy & paste coding via imports.