multidex: Fix java.lang.RuntimeException: Unable to instantiate application

Fix main classes are not in classes.dex, because we should not expect the
order of File.listFiles().

We should prefer original file name unless conflict, or we regenerate
another.

SO: http://stackoverflow.com/q/26763702/2872224
Issue 78761: multidex support doesn't work as expected

Change-Id: I743aad669c73fe4acd5666919bdc3867dbd6f299
Support multiDexKeepProguard, multiDexKeepFile

Change-Id: Ifff039f434388fc21658896a8e0ec58e38c484d7