Add QT_VERSION checks so that the code can still be built with Qt versions
older than 5.10 (that's where QSortFilterProxyModel gained recursive
filtering capabilities).
Also add some defines to ease porting in the future; add a dud
setRecursiveFilteringEnabled() method to keep backward compatibility.
For details see the code the review.