Electronic and elastic properties of non-oxide anti-perovskites from first principles: Superconducting CdCNi 3 in comparison with magnetic InCNi 3