Apple has reached a major milestone after becoming the first company in the US to be valued at $2 trillion.