Spinning flywheels have been used for centuries for jobs from making pottery to running steam engines. Now the ancient tool has been given a new job by a Massachusetts company: smooth out the electricity flow, and do it fast and clean. Beacon Power’s flywheels — each weighing one ton, levitating in a sealed chamber and spinning up to 16,000 times per minute — will make the electric grid more efficient and green, the company says. It’s being given a chance to prove it: The U.S. Department of Energy has granted Beacon a $43 million conditional loan guarantee.