Make PercentPerItem also check if rule responds to #products, the same as PerItem does

Test that the code does as it should
Fix failing spec and cleanup some deprecations.
[Core] Fix mock and stub deprecations.
Use spree_login_path instead of spree.login_path

When redirecting users for authentication, `spree.login_path` doesn't
work properly when a `login` named route is defined outside the spree
core engine scope. Besides it keeps compatibility with what it's defined
in lib/spree/authentication_helpers.rb
Only create assets if component is included (on install)

In cases users are only running a backend application, for example,
there's no need to add frontend assets as it would only break user
application

Fixes #3368