Format with JS-Beautify
(CE-669) Move handling of dismissed messages to client

Moving the creation of the message HTML and removing the dismissed
messages to the client so that there aren't issues now that it will
be cached by Varnish and so the cached result is shared by all anons.
Merge pull request #2963 from Wikia/CE-669

(CE-669) Move dismissed message handling to client