Ab initio thermodynamics of complex alloys: The case of Al- and Mn-doped ferritic steels