[emacs] Fix byte compilation warnings
[emacs] Simplify and tidy up ledger-occur

Introducing a proper minor mode saves a lot of the hand-rolled fiddling
about, like managing the overlay lifecycle and the modeline.