Suppress repaint while executing batch commands

The modeler's batch command system was not affecting
the ScriptingAPI, which manually calls repaint after
each command.

ScriptingAPI now sets its own flag, which suppresses
repainting until the batch is finished.

This speeds up decreasing the volume in the vol-pressure
model from ~230 ms to ~25 ms.