The Borussia Dortmund and Germany defender is leaving football at the end of the season, when his contract at the club was already due to expire