Don't discard directory entries in jar files.

This is a structural change, and breaks code that looks up
directory resource names (icu4j for example).

This change also includes a minor cosmetic change to use a
while() loop instead of for(;;).

bug: 19108324

(cherry picked from commit 7736e8ff04c2974edd9de9ca150f12dc601b005d)

Change-Id: Ifcbc60cc7808334cdfdd4f27bf137a8f6455117d
1 file changed