Fix building WHERE conditions in query designers
- fixed typo while porting to Kexi 3
- check for null WHERE expression instead of valid expression because validity can't be computed so early
Fix updating SQL statement in SQL designer after switching from other views and property revert to previous SQL
When clearing data cursor while resetting query data view also clear cached data
+ add more checks for existence of data because now it's possible that data is missing
Related: https://bugs.kde.org/377579