Thermal and elastic properties of perovskite oxides from first principles