configure: Group and sort function/struct/type checks

Group checks into logical groups and sort alphabetically within those groups
unless checks have close coupling. Keep closely coupled checks together.
