Fighting has erupted in Sudan’s capital Khartoum and at other sites across the country as powerful rival military factions battle for control, increasing the risk of a nationwide civil war.