Modify subcommand call structure to extendable.

Don't merge yet!
The class SubCommand has nothing to do with index server.
You had better add a class that is derived from SubCommand if you'd like do that.