Pyrolysis of lignite with internal recycling and conversion of oil