Up to 13,000 people have fled to UN compounds in the South Sudan capital to escape clashes between rival army factions.