Move post type registration to separate class.
Remember which attributes get registered and added taxonomy_is_product_attribute() function

Closes #3149.