TRIPOLI, Libya — A revolt by a renegade general against Islamists who dominate Libya's politics threatened to spiral into an outright battle for power that could fragment the North African nation as the country's numerous armed militias on Monday started to line up behind the rival camps.