Elastic properties and stability of Heusler compounds: Cubic Co2YZ compounds with L21 structure