Fix ICAT datetime in GUI. Refs #8209.

- Sorting should happen only when data is in the table.
- Changed the format of dates to allow them to be sorted easier.
Merge branch 'feature/8209_icat_datetime_fix' into develop