Rewrite the main queries in lda_train and lda_pred to fix GPSQL-713
Minor change