#2311 fix for "Exclude sale items from coupons"

'Scuse the mess of commits/reverts, I'm (super) new to git. 

This was my take to fix it, essentially repurposing the same code you use to match excluded product ID's, but comparing it against the (awesome new) array generated by the new get_woocommerce_product_ids_on_sale() function. 

Strict type matching in the is_array() was necessary to avoid problems caused by the '0' string that seems to be on the end of every product_ids_on_sale array 

Tested on 3.5.1 + the git build of WooCommerce

Hope it helps guys.