The structure, electronic, magnetic and optical properties of the Co-X (X = B, C, N, O or F) codoped single-layer WS2