Malawi’s president has been declared winner of the country’s closest ever election