Which country did Britain ally with in 1904