compute max argument index mentioned by ToplMonitor.automaton
parametrized [ToplMonitor.automaton] by pattern type

- in toplSpecs.ml: don't open modules, and use slightly higher-level
  interface functions from Psyntax