Use libziparchive for dalvik zip processing.

The API was similar enough that we could just delegate
to existing zip functions. The existing ZipArchiveHandle /
ZipEntry types have been reused instead of defining new
types.

The old ZipArchive type has been removed because it serves
no useful purpose, and no code was using it anyway.

Change-Id: I47f12344d1e6efc234fed50b1613f9f179a9b03f
Fix libutils dependencies for dexdump & dexlist.

We should always use a libutils SHARED_LIBRARY on the target &
a STATIC_LIBRARY on the host.

(cherry picked from commit 2ac78805e1b4d80308c5c4a48a997abc3a2ac37b)

Change-Id: I06c9b8f0cf663e00da0eeba54c893d8eec1d8a9f
Revert "Use libziparchive for dalvik zip processing."

Bug: 12173498

This reverts commit ac4202a846965a6b5a88001a8ad3d5321edeb81c.

Change-Id: Ie48d873bded13e0f73cb1e926dbcd30a66933176
Revert "Revert "Use libziparchive for dalvik zip processing.""

This reverts commit 52dacd58ac8735ffdcd6bbe952586a38ad70e6a5.

Change-Id: Ifbb3556449d000a53c2304d998d5ecce82e4940d
Fix a few bugs introduced by the move to zip_archive.

- mmap failures because the output file was opened with
  O_WRONLY instead of O_RDWR

- In two instances, we were passing the wrong handle
  to CloseArchive(ZipArchiveHandle). The issue is code
  like this:

  ZipArchiveHandle h;
  OpenArchive(&h);
  CloseArchive(&h);

  This compiles, but isn't correct. ZipArchiveHandle is
  a typedef for (void *) and the compiler won't complain
  because void** is also void*. Some of this code was written
  before the API was changed from CloseArchive(ZipArchiveHandle&)
  to CloseArchie(ZipArchiveHandle) but continued to compile
  even after the API change. I'll change the API in the follow up
  to catch errors like this at compile time.

bug: 12173498
bug: 12176258
bug: 12178641

Change-Id: I71ac36654311f582b5ab633e1ed0d13e00053c84
Fix libutils dependencies for dexdump & dexlist (again).

We managed to get into a bad state because the change that
fixed dependencies on dalvik-dev was cherry-picked on to
master-aosp and then the change that needed this was
reverted.

Git got confused as a result.

Change-Id: Idef607a676cff85d00e95a94a9be09d791b2fa96