Amazon briefly edges out Apple for most valuable company