Applications of convex analysis to consensus algorithms, pointwise asymptotic stability, and its robustness