Add caveats class and use in brew info.

Probably a better approach than reverted e721c7.

Fixes #16604.