Thermodynamic potential and phase diagram for multiferroic bismuth ferrite (BiFeO3)