A leaking gas well that spewed tons of methane into the air and forced thousands of Los Angeles residents from their homes has been permanently sealed, state officials said.