make_ext4fs: fix block allocation to be best-fit

The block allocation algorithm was failing to allocate parts of large
files out of partially filled block groups.  Update the allocation
algorithm to be a simpler best fit loop - if the remaining length to
allocate is larger than any single contiguous region, allocate the
largest single contiguous region and continue allocating, otherwise
allocate the smallest contiguous that can hold the length.

Change-Id: Idcc60df91ed0a266d3128ea46e86408a581d3f40