Double Olympic champion Alistair Brownlee has announced his retirement from triathlon at 36 after inspiring a generation of British athletes