[code style] com_messages backend. Closes #4569

deprecates JHtmlMessages::state() function and introduces new one with proper arguments.