Electronic structures and improvement of magnetic properties of RFe12X (R = Y, Ce, Gd; X = N, C)