For 18 years, an unremarkable blue machine has been a fixture at corner convenience stores, its tired keys accepting millions of bets from players hoping a lucky string of numbers – a kid’s birthday, an old address – will just this once bend the rules of probability and change everything. But, with casino gambling coming to Massachusetts, the state lottery is looking to replace the 8,500 aging blue terminals and the massive computer system that processes nearly $5 billion in bets a year.