Misc corrections 4

-remember settings on logic view: time frame and tick mark grid are
remembered between sessions.
-called OnClose() for every plugin before closing the emulator.
-Corrected reset events.