Balendra Shah, the onetime rap artist and former mayor of the country’s capital, is on course to become the country’s next prime minister.