use AR 4 syntax or prefix table name on some scopes

Fixes #4225

Conflicts:
	core/app/models/spree/adjustment.rb