Support dx generating multiple dex files.

Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.

(cherry picked from commit 8ffe9c3e7967ec9c6c6e9a03095454dc1b073c3b)

Conflicts:
        core/java.mk

Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
2 files changed