Rotational stability of tidally deformed planetary bodies