Hierarchical product URL support.

Adds the new setting SHOP_USE_HIERARCHICAL_URLS (default disabled).  When
enabled, a product URL is determined as follows:

  - If the product belongs to exactly one category, the product's URL will be:
      <category-slug>/<product-slug>/<product-id>

  - Otherwise, the product's URL will be as before:
      product/<product-slug>