The role of magnetoelastic and magnetostrictive energies in the magnetization process of MnAs/GaAs epilayers