Sri Lanka declares state of emergency after president flees