msm_shared: Fix the logic of gpt partition parser
msm_shared: Fix the logic of gpt partition parser

The existing logic in the gpt partition parser assumes the max
number of partitions to be multiple of 4 & does not take into
account partition count which is not a multiple of 4. Fix the
logic to recognize all the partitions.

Change-Id: Ic97362e21c3ae3d8fc3a7805a670b632b1c27de0
CRs-Fixed: 447733

M1cha/android_bootable_bootloader_lk,mozilla-b2g/kernel_lk,lg-devs/g2-bootloader,idor/dk50-bootable_bootloader_lk,chirayudesai/android_bootable_bootloader_lk,thornbirdblue/codeaurora_lk,mozilla-b2g/fairphone2_kernel_lk,Redmi-dev/android_bootable_lk,Foxda-Tech/polaris-bootable-bootloader-lk,Foxda-Tech/polaris-bootable-bootloader-lk,t2m-foxfone/android_kernel_lk,mozilla-b2g/kernel_lk,idor/dk50-bootable_bootloader_lk,Redmi-dev/android_bootable_lk,Foxda-Tech/argo8-bootable-bootloader-lk,efidroid/lk,chirayudesai/android_bootable_bootloader_lk,jsr-d10/android_bootable_bootloader_lk,lg-devs/g2-bootloader,t2m-foxfone/android_kernel_lk,hanjae/lumiab0,chirayudesai/android_bootable_bootloader_lk,detule/lk-g2-spr,thornbirdblue/codeaurora_lk,lg-devs/g2-bootloader,lg-devs/g2-bootloader,M1cha/android_bootable_bootloader_lk,idor/dk50-bootable_bootloader_lk,hanjae/lumiab0,hanjae/lumiab0,CanarySolutions/little-kernel,idor/dk50-bootable_bootloader_lk,jbott/lk_gee,DooMLoRD/android_bootable_bootloader_lk,detule/lk-g2-spr,Foxda-Tech/polaris-bootable-bootloader-lk,Foxda-Tech/argo8-bootable-bootloader-lk,t2m-foxfone/android_kernel_lk,efidroid/lk,Foxda-Tech/argo8-bootable-bootloader-lk,lg-devs/g2-bootloader,M1cha/android_bootable_bootloader_lk,efidroid/lk,jbott/lk_gee,chirayudesai/android_bootable_bootloader_lk,DooMLoRD/android_bootable_bootloader_lk,Foxda-Tech/argo8-bootable-bootloader-lk,jbott/lk_gee,DooMLoRD/android_bootable_bootloader_lk,M1cha/lktris,M1cha/lktris,mozilla-b2g/fairphone2_kernel_lk,efidroid/lk,t2m-foxfone/kernel_lk,jbott/lk_gee,Foxda-Tech/polaris-bootable-bootloader-lk,t2m-foxfone/kernel_lk,Foxda-Tech/polaris-bootable-bootloader-lk,t2m-foxfone/kernel_lk,M1cha/lktris,M1cha/android_bootable_bootloader_lk,jsr-d10/android_bootable_bootloader_lk,detule/lk-g2-spr,efidroid/lk,mozilla-b2g/kernel_lk,mozilla-b2g/kernel_lk,thornbirdblue/codeaurora_lk,Redmi-dev/android_bootable_lk,Redmi-dev/android_bootable_lk,jsr-d10/android_bootable_bootloader_lk,CanarySolutions/little-kernel,mozilla-b2g/kernel_lk,jsr-d10/android_bootable_bootloader_lk,DooMLoRD/android_bootable_bootloader_lk,CanarySolutions/little-kernel,jbott/lk_gee,CanarySolutions/little-kernel,jsr-d10/android_bootable_bootloader_lk,thornbirdblue/codeaurora_lk,M1cha/android_bootable_bootloader_lk,M1cha/lktris,Foxda-Tech/argo8-bootable-bootloader-lk,CanarySolutions/little-kernel,DooMLoRD/android_bootable_bootloader_lk,t2m-foxfone/android_kernel_lk,mozilla-b2g/fairphone2_kernel_lk,chirayudesai/android_bootable_bootloader_lk,hanjae/lumiab0,t2m-foxfone/android_kernel_lk,mozilla-b2g/fairphone2_kernel_lk,M1cha/lktris,Redmi-dev/android_bootable_lk,detule/lk-g2-spr,M1cha/android_bootable_bootloader_lk,mozilla-b2g/fairphone2_kernel_lk,thornbirdblue/codeaurora_lk,t2m-foxfone/kernel_lk,t2m-foxfone/kernel_lk,hanjae/lumiab0,detule/lk-g2-spr,idor/dk50-bootable_bootloader_lk