First principles study of magnetic anisotropy and magnetoelectric effect of FePd/MgO(001) ultrathin films