Support for residual convergence

Can now use options.convergence_type = ‘residual’ or ‘iteration’ to
choose between using ||y-F(a)||_2^2/N or
||last_a - a||_2^2/N, respectively, for a stopping criterion.