With the grinding and joyless campaign for governor lurching into its final two weeks, both Tom Foley and Dannel P. Malloy are chasing a dwindling but influential group of undecided voters who could provide a narrow edge in what is likely to be an extremely close election.