Factor out custom fields portfolio filter and sorting
Minor SQL sorting refactor
Replace association with SQL snippet @lleirborras
Don't display projects without an image portfolio
Minor SQL pickyness refactor