Well, I took out one test which wasn't really necessary and realized
it's all working again. Mysterious.
Tried to make gem more robust to no flann_get_distance_type and
flann_get_distance_order functions.