(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.