Detect missing system tray

Fixes #497
(cherry picked from commit a63863b65c05a72aa54ee8ad35a98689ae092c4b)
Documented the docexpire option.
(cherry picked from commit 5da6103fb5f9a54b2e7b1133ad799cc0d17c7faf)