On the demagnetizing energy and demagnetizing factor of a multidomain ferromagnetic cube