Arminia Bielefeld came from a goal down at home to Hertha Berlin to ensure Bundesliga 2 survival by scoring six times in the second half on the final day.