X‐ray photoemission of carbon: Lineshape analysis and application to studies of coals