A tabloid scandal bankrolled a Long Island Democrat, mostly with out-of-district money. A Hollywood-linked tycoon backed a Republican who beat him.