Structure and bonding of ScCN and ScNC: Ground and low-lying states