According to treaties signed in 1818 and 1827, with which country did the united states jointly occupy oregon?.