android.mime.types: Allow one-way mime -> ext only override.

Lines in android.mime.types define mappings between MIME types
and extensions; before this CL, MIME -> extension would override
earlier mappings if and only if the first extension was marked
with the suffix '!', as in:

  mime ext1! ext2 ext3

extension -> MIME mappings would always override earlier lines
(in the above example, each of {ext1, ext2, ext3} would be mapped
to mime); there was no opt-out.

After this CL, it's possible to choose between override (put()
semantics) vs. keeping existing mappings (putIfAbsent() semantics) in
both directions. This is now expressed by putting a '?' in front of
the value _from_ which one maps. For example, the line:

  mime ?ext1 ?ext2 ext3

will put a mapping
 ext3 -> mime
that overrides any earlier mapping, but it will putIfAbsent
the mappings:
 ext1 -> mime
 ext2 -> mime
(leaving any mapping untouched that was added earlier).

This CL rewrites android.mime.types to express the same semantics
as before in the new syntax. Therefore, this CL is a pure
refactoring and doesn't change the mapping. Follow-up CLs will make
use of the new ability to express one-way mime -> ext overrides (e.g.
for b/131913690).

Note that each MIME type occurs at most once in the file mime.types,
so the change in semantics (putIfAbsent vs. put) of
  mime ext1 ext2 ext3
does not affect the semantics of that file.

Test: Checked that behavior didn't change by running the test
      logic attached to http://b/122831291#comment14

Change-Id: Ie813ca46b4690f7e0e01bb399416f56654ef08ef
2 files changed