Beijing has responded angrily to a US executive order to look into the country's dependence on rare earths from China.