Allow IDs matching a certain hashtag to be returned by type.

This change avoids an N+1 problem when hashtags are returned with #hashtaggables.