add query count tests for #index and #show

This verifies that we don't have 'N +1 selects" (or worse) behavior.
Well, at least for sparse enum types.