Improve compatibility with both Qt5 and Qt6
In particular:
- when building for Qt5, add typedefs for QWebEnigneDownloadItem and QWebEngineContextMenuData using their names in Qt6
- Add new way of handling certificate errors when building for Qt6
- Add WebEnginePage::view() when building for Qt6, since that method has been removed