Mexico's president has achieved impressive reforms thanks to a cross-party pact. But controversial plans for energy reform may force him to choose between cooperation and change