[ticket/12034] AJAXify notifications popup.

PHPBB3-12034
[ticket/12034] Add comma to end of array.

PHPBB3-12034
[ticket/12034] Move similar code in the two callbacks to separate function.

PHPBB3-12034
Merge pull request #1890 from prototech/ticket/12034

[ticket/12034] AJAXify notifications popup.