Correct the RemainingPages calculation in PEI AllocatePages service.

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15035 6f19259b-4bc3-4df7-8a09-765794883524
Update the heap migration logic to avoid memory overflow. 

Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15036 6f19259b-4bc3-4df7-8a09-765794883524
Merge branch 'master' of git://github.com/tianocore/edk2