patch: mtmc dexopt - make generic.

-Reworked my patch to be more generic.

-Multithreaded Mulitcore dexopt enabled automatically if more than
one core.

-Record the process "online" states before enabling cores.

-Restore recorded states when we are done.

NOTE: Now this should be generic enough to work on any device.