Density functional theory study of the carbon chains CnX, CnX+ and CnX- (X = O and Se; n = 1–10)