First-principles thermodynamics from phonon and Debye model: Application to Ni and Ni3Al