Sulfur K-edge XANES study of sulfur transformation during pyrolysis of four coals with different ranks