Automatically set app and db properties in plugin if they exist in the plugin class.

I find my self many times overriding the constructor in my plugins simply to add a reference to `$this->app` and `$this->db` for easy access to the application object and the database object within my plugin methods. The proposed update takes care of this by adding a bit of magic to the JPlugin constructor. It checks to see if the `app` and `db` properties exist within your plugin class, and if they do (and are null) it will set them to `JFactory::getApplication()` and `JFactory::getDbo()` automatically.

It's a minor change, but it makes J! programming that easier.

Feature Tracker Item: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31205