........S. [ZBX-8444] code improvements:
* moved escalation trigger checking into separate function to reduce clutter and indentation levels
* replaced [<id>] in error messages  with id:<id>
* replaced '<name>' in error messages with "<name>"
* used get_functionids() instead of manual expression parsing