joinUrlRewrite. Join on non-existing column

joinUrlRewrite() tried to join on a non-existing column in `core_url_rewrite`.
Before the fix, this join was done with the product entity_id, on the entity_id column of core_url_rewrite.
This column does not exists in core_url_rewrite.
I've changed to query to join on product_id in core_url_rewrite.

It also used a conditional statement where type = 2. But column `type` does not exist in core_url_rewrite. I've removed this conditional statement.

Before fix, Magento would throw an exception. After fix, it joins the correct columns