code: public static <T> C.List<T> toList(Iterator<? extends T> iterator) {
          ListBuilder<T> lb = new ListBuilder<T>(10);
          lb.append(iterator);
          return lb.toList();
      }
docs: Returns an immutable {@link org.osgl.util.C.List} from an iterator
  @param iterator the iterator
  @param <T> the element type
  @return an immutable list contains all elements from the iterator