Bayern pip Dortmund to dramatic Bundesliga title