Set $variation object when add variation via ajax

When the variation-admin-html.php template is loaded on the Edit
Product screen, $variation is a WP_Post Object. When the template
is loaded by woocommerce_add_variation() handling an Ajax call,
$variation is an array. This commit makes $variation consistent so
functions hooking to 'woocommerce_product_after_variable_attributes'
and 'woocommerce_variation_options' receive the same variable type
regardless of what initiated the template loading.
Use sanitized $product_type->name values

product_type term slugs are inconsistent so can not be used as unique
identifiers, but product_type term names may have white space and other
characters unsafe for option values, class names & or hooks, therefore,
product_type term names should be sanitized.
Create WC standards compliant class name from term
Merge pull request #2547 from thenbrent/variation-patches

Variation patch & sanitized product_type names
fix star ratings in firefox
Check if set