Twitter shareholders are suing Elon Musk, accusing him of acting illegally in the way he has handled his takeover bid.