Massachusetts racetrack owners, in a bid to win state approval for thousands of slot machines, are pledging hundreds of millions in aid to cash-strapped city and town governments. The legislative push, in turn, has thrust racinos back into the long-running debate over expanded gambling.