Oil prices jumped after OPEC and non-member producers agreed on a deal to cut output to ease a global supply glut.