Google has been ordered to open up its app store to rivals following a major court case in the US.