Added a Scala preference for Mark Occurrences

Added a toolbar button for quick access.
Fixes #1001466
Fixes problems in preference state sharing

Using only Boolean, and correctly starting the toggle handler listener.
Merge pull request #314 from skyluc/backport/mark-occurrence-preference-1001466

backport/mark occurrence preference 1001466