Hundreds of gallons of used cooking oil, worth thousands of dollars, were taken from a container outside a Massachusetts restaurant during a heist that was thwarted by police early Saturday morning.