"I must say" is an mannerism used by some English speakers. It is used only for emphasis and has no real meaning on its own.
I must say, that Hermione Granger is an excellent student.
These are the best gluten-free chocolate cakes I have ever tasted, I must say!
"I must say" is a phrase that tends to be used by older people, who talk in a formal manner (like Dumbledore), and is probably more common in the UK than elsewhere. In narrative it gives some information about the character -- that the speaker is the kind of person who says "I must say" -- but otherwise can be ignored as unimportant to the meaning of what is being said.
In your example the emphasis is one of polite surprise. Dumbledore is both pleased and astonished that Harry survived his encounter with Quirrell, and "I must say" is his way of emphasizing that feeling.
(Edit) As Jason Bassford's comment says it's an interjection without meaning of its own. A character could even exclaim, "I must say!" by itself, and the only way to know the meaning is from the rest of the context:
Railway conductor: Lord Brumley, I'm afraid there's no more room in first class. You'll have to go back to second class.
Brumley: I must say!
Conductor: I'm terribly sorry but there's nothing to be done. The Queen and her staff have completely occupied all of the first class carriages.
Here Lord Brumley is expressing indignation at what he perceives as inferior treatment -- but we only know this by inference from the surrounding dialogue.
Best Answer
This is the voice of Capt Washburn speaking about his situation in 1946. He is an old sailor, with a strong dialect. This isn't standard English.
The word "good" is an adverb in the sentence, with the meaning of "completely" or "to the utmost extent". But note that the adverbial use of "good" is considered to be a mistake in standard English.