Add test for add_taxonomy_data regression

This adds a test to verify that get_taxonomies only returns taxonomies
for the provided post type if a type is passed into the function. This
ensures that the taxonomies embedded into post type endpoint responses
will be accurate.

It also DRYs up the test code a bit to avoid repeating the methods for
filtering a taxonomy collection down to only "public" members.