Casino gambling foes are ecstatic after residents of East Boston and Palmer rejected proposals for resort casinos in their communities, votes that could dramatically alter the future landscape for gambling in Massachusetts. East Boston voters on Tuesday rejected a proposed $1 billion casino at the Suffolk Downs thoroughbred race track by a 56-44 percent margin, according to unofficial returns. The project won the approval of Revere voters in a separate referendum, leading the city's mayor to suggest that Suffolk Downs could try to relocate the project entirely to Revere. In Palmer, Mohegan Sun's proposed $1 billion casino was defeated by a margin of less than 100 votes out of about 5,200 cast in the small western Massachusetts town, unofficial returns showed. Mohegan Sun said it would ask for a recount.