Limit get_terms to Posts in Query

Every now and then we need to create a list of taxonomies that are not just empty, but are also not found in the posts for that page.

I recently found a pretty sweet solution over on Stack Overflow and wanted to share.