PHOENIX-933 Local index support to Phoenix

One thing that's necessary, though, to maintain rows in row key order is to modify ScanPlan.java:118 to do a merge sort instead of a concat:

            if ((isSalted || isLocalIndex) &&
                    (context.getConnection().getQueryServices().getProps().getBoolean(
                            QueryServices.ROW_KEY_ORDER_SALTED_TABLE_ATTRIB,
                            QueryServicesOptions.DEFAULT_ROW_KEY_ORDER_SALTED_TABLE) ||
                     orderBy == OrderBy.FWD_ROW_KEY_ORDER_BY ||
                     orderBy == OrderBy.REV_ROW_KEY_ORDER_BY)) { // ORDER BY was optimized out b/c query is in row key order
                scanner = new MergeSortRowKeyResultIterator(iterators, SaltingUtil.NUM_SALTING_BYTES, orderBy == OrderBy.REV_ROW_KEY_ORDER_BY);
            } else {
                scanner = new ConcatResultIterator(iterators);
            }

Local indexes are similar to salted tables in that the parallel scans will all be within a region, ordered correctly. As long as we do a merge sort across the results of these scans, the rows will be ordered correctly.