Abstract the logic from simg2img into libsparse, and add logic
for reading a regular image into libsparse. simg2img then
becomes a simple wrapper around libsparse.
img2simg was not actually making the file sparse, it was using
sparse files to create multiple files that could be pieced back
together. Replace it with a simple wrapper around libsparse.
Its functionality will be replaced by an simg2simg that can
resparse a file into smaller chunks.
Change-Id: I266f70e1c750454183ce46c71a7bb66bbb033a26
This moves an exact copy of libsparse from
system/extras/ext4_utils/libsparse to system/core/libsparse in
preparation for linking tools in system/core against it.
Change-Id: If664e4fcfd6612844ac745589beb1517e7f9fe58