new function and more do_action hooks

Added three do_action hooks to the writepanel-product_data.php file. They allow plugins and extensions to add extra fields to the inventory tab without having to add fields inside of the currently existing fields.

Also added a function to the core-functions file that returns a count of how many of a specific product a given user has purchased.