Jonathan Rea, the most successful rider in World Superbike history, has announced his retirement at the end of 2025.