Fix errors sorting add-ons (#18847)
Fixes #18838
Summary of the issue:
When an add-on is installed for the first time, it's shown in the updatable add-ons, where installation can be cancelled. If we try to sort add-ons by current installed version, errors are writen to the log.
Also, in alpha versions, if we sort add-ons by dates, after closing the store dialog, it cannot be opened again.
Description of user facing changes:
Add-ons can be sorted from the updatable add-ons tab without errors, even if an add-on is not fully installed. Also, a regression is fixed where trying to sort add-ons by dates, the store dialog cannot be reopened after trying to close it.
Description of developer facing changes:
None.
Description of development approach:
See the NVDA log and address cases where _addonModel attribute is None. Also, for publication and install date fields, don't cast them, since this causes a regresssion when trying to sort add-ons by dates.