Kyrgyzstan president resigns after weeks of turmoil