Allow setFlags() to set multiple flags as an array + minor code reviews

Added the possibility the set multiple message flags at one time by passing an array of flags. It is still possible to pass a single flag as a string.

Also replaced raw string flag values by class constants

And a minor regex optimization to convert <br /> to EOL, that also strip useless trailing spaces