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