The IR module partitioning logic has been embeded in CompileOnDemandLayer but this functionality is also required for other purpose such as re-optimization.
This patch splits that IR partitioning logic out of CompileOnDemandLayer into a new IR layer IRPartitionLayer.
A motivation behind making it into new IR layer is for the possibility of "lazy re-optimizing JIT" where we'd like to have a composition like "IRPartitionLayer -> CompileOnDemandLayer -> ReOptLayer"