Run API instance endpoints through a filter provided by a plugin.

This allows external apps to filter out certain instances from being
shown in the mobile apps.
Allow contains lookups on JSONFields.
Merge pull request #1706 from maurizi/api-plugin-filter

Add plugin for filtering instances from the API