Axions in inflationary cosmology