Learning Weakly Convex Regularizers for Convergent Image-Reconstruction Algorithms