Wiener's lemma for twisted convolution and Gabor frames