smartplaylists: use simple WHERE conditions instead of expensive IN statements
smartplaylists: cosmetics in SQL queries
smartplaylists: use SELECT DISTINCT in SQL sub-queries
smartplaylists: replace SQL IN with SQL EXISTS in WHERE conditions
Merge pull request #3386 from Montellese/xsp_sql_optims

Optimisations for SQL queries generated for smartplaylists