Fixed CV_ASSERT condition in the code for bag of words

Bug #3543

We need the "vocabulary" to not be empty (i.e vocabulary.empty() should return false).