Initial add bug

This PR goes with issue 32210 and fixes a bug with version history when you add new articles, categories, or weblinks. It also improves code quality and third-party dev flexibility. See http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32210&start=0 for more information.