Anett Kontaveit has confirmed she will retire from tennis following this year's Wimbledon, despite being only 27 years old.