Efficient Algorithms For Markov Random Fields, Isotonic Regression, Graph Fused Lasso, And Image Segmentation