Nicolás Maduro, the handpicked political heir to Hugo Chávez, won election to serve the remainder of Mr. Chávez’s term, officials said. Mr. Maduro’s opponent, Henrique Capriles Radonski, demanded a recount.