In a large nonstick skillet, heat butter over medium-high until melted and bubbling. Add onions, and reduce heat to medium; cook, stirring occasionally, until softened, 8 to 10 minutes. Add sherry and all remaining ingredients; cook, stirring occasionally, until onions are lightly golden and have cooked down to about one-fourth of their original volume, 25 to 30 minutes, adjusting heat as needed. (See PRO TIP.) Let cool completely before using.