Branes in \(N=2,\, D=4\) supergravity and the conformal field theory limit. M-theoretic derivations of 4d-2d dualities: from a geometric Langlands duality for surfaces, to the AGT correspondence, to integrable systems 