Integration with JPlugin.

Extend JPlugin rather than JObject for API plugin class. My recommendation would also be to replace fetchResource with an event method, E.g. onAPIFetchResource and to remove getInstance to more closely match Joomla's plugin conventions.

Please let me know if you would like me to make these changes.