Unfortunately the above two answers (including my own answer) didn't actually do what I needed.
I want to use the mask in the Video Sequence Editor (VSE). The simplest way is to apply a strip modifier, but that doesn't seem to make use of masks with alpha. It seems to want a grey scale image as a mask.
Here is the set-up for a black and white mask:
Render Layer node connected to IDMask connected to Invert RGB... and there is a composite output node.
If a file output node is connected this produces TWO outputs, one going to the selected file address in the output node and the other going to the address in the render panel. (BUG?)
The background shows the mask as white on black. This works as a VSE strip modifier.
(Note: not using fileOuput)
VSE use of mask as strip modifier:
(The reason why I wanted to do this is based on ignorance. I had a low sample test render of the entire film. I liked the low res. grainy look for the background, but wanted the foreground to be done with more detail so I did new renders of just the foreground objects. I thought I was doing this with alpha, but forgot to click the RGBA button. So I had objects on black instead of objects on alpha. From there I had to find a way to fix that. First I tried color keying to turn the black to alpha, which partially worked, but some of the darker parts of the objects went transparent. So I read up on masking, but the info was about masking in compositing and that isn't the same as masking in video editing.
Another way to produce this effect, if it had been planned from the beginning would be to put the background on a different render layer and make that low sample while the objects on other layers were high sample.)