Decomposition of pyrite and trapping of sulphur in a coal matrix during pyrolysis of coal