keylogger: Fix a few leaks
keylogger: Rearrange internal vars

Put source / source_id together.
keylogger: Fix dispatching logic a tiny bit
keylogger: Add a free function

Just to be a good citizen.
keylogger: Make sure to clean up the ctx too
keylogger: Fix enable/disable

It turns out XRecord was flat out never tested, and
XRecordDisableContext doesn't even work. Filter out these events
client-side.
main: Make the text view uneditable