Melt butter in a saucepan over medium heat, then saute onions until soft. Add remaining ingredients, cover and simmer for 20 minutes. Uncover, bring to a boil until it is reduced by 1/3. Allow to cool, strain to remove onion pieces, then freeze in 1-2 cup portions (or whatever portion size you find most convenient).
To use from freezer
Either thaw in refrigerator or place sealed container in hot water. Then heat in saucepan or microwave, then use.