The president of Madagascar Andry Rajoelina has claimed a coup is under way after weeks of intense youth-led protests.