Use a single function for testing and enumeration of optional features.

https://github.com/quixdb/squash/issues/41