Improved jvm compile partitioning algorithm.

Adds a heuristic to put locally-edited files
in their own partition.

See comments in code for explanation of the reasons for this.