..F....... [ZBX-9018] code refactoring

 - added validation for time periods;
 - moved validation of input parameters to the upper level for config-related adm.* pages
 - moved audit for this pages into update_conig() function
 - ... as well as many other useful changes