A gang of thieves has been jailed after raiding dozens of supermarkets and using power tools to cut open cash machines.