Precombustion removal of mercury from coal by mild pyrolysis