Well I had to rush to go out when I wrote that. The -cleanstretch 2 is not meant to help with scanlines or anything but to be able to use as few resolutions as possible and still get integer scaling in the vertical axis. So in that regard it's useful to apply it in both scenarios explained above. Basically, you'd use:
1.- Software scanlines (-cleanstretch 2, -effect scanlines, -monitor arcade_31 / vesa_480 / vesa_600):
2560x480@60 (31 kHz)
2560x512@60 (> 31 kHz)
2560x576@60 (> 31 kHz)
2.- Hardware scanlines (-cleanstretch 2, -black frame insertion, -monitor pc_31_120 / pc_70_120):
2560x240@120 (31 kHz)
2560x256@120 (> 31 kHz)
2560x288@120 (> 31 kHz)
Both setups are visually equivalent. Notice that resolutions above 480/240 require more than 31 kHz, not a problem for the average PC monitor that can reach 70 kHz or more, but something to care about with a "high" res or tri-sync arcade monitor.
To make sure that GroovyMAME will pick the ultrawide resolutions, and only these, in case you have a set of resolutions for other emulators, you can use this option:
-resolution 2560x0
This will work as a wildcard for resolutions that are 2560 pixels wide. So GroovyMAME will select the best height from the ones available to ensure that the vertical scaling will be integer as long as it's possible.
Finally, you need to define the proper -monitor option to tell GroovyMAME which frequencies are available. Above are the usual predefined ones along with their particular use case, you need to decide which one is good for your monitor. The best is to create your own preset that fits your exact needs, regarding maximum height, frequencies, etc.
Much of the fun of this is to use GroovyMAME to set the right refresh rates for each game. This is trivial if you use CRT Emudriver. Of course if you're not using an ATI card you need to find your way to add those video modes to the system, and then if you want custom refresh rates too, maybe use Powerstrip to produce them. Now GroovyMAME can pass your custom defined modeline to Powerstrip on a per ini base so you could in theory achieve whatever you want provided the card is supported by Powerstrip and you have the time and patience.