Preparation of transition metal–carbon material from polyacrylonitrile incorporated with inorganic salts