British retail sales unexpectedly edged up in July, helped by the strongest growth in online spending in three years, as consumers continued to support the economy before the Oct. 31 Brexit deadline.