After updating customer details, ensure state is transitioned as far to 'complete' as is possible

Fixes #2950
Fixes #2433
G Analytics apparently not using protocol specific subdomain now.

Fixes #2977
Fix customer details spec test checking for order state

Related to #2950 and #2433
Use DISTINCT ON to make in_taxon scope return truly distinct products in PostgreSQL

Fixes #2851