Work-around invoke-range not recycling argument registers.

Bug: 13531821
Change-Id: I02352940e67f4c007b00849868627e4b408b0e83
Return the correct error code in multi-thread mode

Bug: 14062905

In "--num-threads" mode, dx did not return a result code different
than zero in case of a Throwable.
This CL aims to have the same behaviour in multi-threaded mode than
in normal mode.
There are 2 cases:
- When there is an Exception, it is supposed to be handled by
ClassPathOpener.Consumer.onException(). The number of errors is then
incremented, which is used in "com.android.dx.command.dexer.Main" to
return the error code. With "--num-threads" it couldn't be handled by
onException(). So I've modified the ParallelProcessor to use the
ClassPathOpener, so that the Exception is handled inside the thread.
- When there is a Throwable that is not an Exception in mono-threaded
mode, it goes all the way up to "com.android.dx.command.Main" which
returns the error code. This is emulated using an
UncaughtExceptionHandler.

Change-Id: Idc9d8d8bc737587ca518f8f9166e5e511ec22908