Terms aggs: only use ordinals on low-cardinality fields by default.

Ordinals tend to be slower and more wasteful memory-wise on high-cardinality fields.

Close #5303