Josh Tongue's five-wicket haul helps Nottinghamshire beat Durham, despite a second century of the game from Colin Ackermann.