major update

add two options --trainid and --testid. These two can control the
samples involved in the training and testing stages. This feature is
useful when performing cross-validation