Premier League record appearance holder Gareth Barry retires