fixes saving permalinks when using joins and includes

When using products with:

```ruby
Spree::Product.class_eval do
  default_scope includes(:taxons)
end
```

Saving a product will throw an exception: `ambiguous column name: permalink`.
This is because in `core/lib/spree/core/permalinks.rb` the `save_permalink` method runs a where query without the table_name.

This pull request should fix that.