The suspect behind the deadly Berlin Pride attack has been shot dead by police after a manhunt that lasted nearly a day.