Quantum chemical studies of CO, CS and related double bonds