Atomic, electronic and thermodynamic properties of cubic and orthorhombic LaMnO3 surfaces