Nicolás Maduro, Hugo Chávez’s handpicked successor, was supposed to ride to a resounding victory in the presidential election. Instead, he squeaked by, and the country seemed headed toward a political showdown.