Encapsulate formatted product name

Patches for #2788. As discussed there, this just moves `woocommerce_get_formatted_product_name()` code into `WC_Product` & `WC_Product_Variation` classes and puts it in the new `get_formatted_name()` function.

SHA: 9e71cd699fb also updates all uses of `woocommerce_get_formatted_product_name()` in core code.

Didn't see a 2.1 branch, so just set this to merge with master.