Fix mishandling of JSOs in JTypeOracle.

A map (jsoSingleImpls) and a set (dualImpls) are mantained in
JTypeOracle to track the status of the interfaces JSOs implement.
This information is used during optimization (mostly by the
JsoDevirtualizer). The invariant that must be preserved is that
if an interface is contained in dualImpls then it has to be a key
in jsoSingleImpls.

After some rounds of optimization this invariant might be broken
as interfaces of uninstantiated JSOs are removed from jsoSingleImpls
but not from dualImpls.

This patch also makes the pruning only happen in whole world
compiles.

Change-Id: I059afd843f104ccd4f8ee2171848da3b5d4f878f
Merge remote-tracking branch 'upstream/master'