A General Framework for a Class of First Order Primal-Dual Algorithms for Convex Optimization in Imaging Science