Nagelsmann to take over as Bayern Munich coach from next season