First step
First step

Summary:
This pass will atempt optimizing enums. Started by looking at the
generated classes and trying to optimize those. There are a few more things to
do for them in the next diffs.

This change: deduplicates equivalent classes.
Background: For enums, javac generates an annonymous class for every place the
enum is used in a switch statement. This class, will contain a statically
initialized array, that is used as a lookup table (in order to transform the
switch statement from a sparse switch in a packed switch). Since those
generated classes might be the same accross different classes, this change
checks that.

Next:
* we might move this to /redex/opt, but for now it uses facebook utilities. Will move those outside first.
* Some of the generated classes can be completly removed (for example when all the enum types are used in a switch statement, or even less) -> next diff
* etc

Reviewed By: justinjhendrick

Differential Revision: D6985286

fbshipit-source-id: 1f4292274b7217b2962c359e2681ae14f9b97b47

facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex