Proper use of XFilterEvent()

This function should be called on every event, not just KeyPress events.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Clear selection on SelectionClear/XA_PRIMARY event

SelectionClear events with a selection attribute of XA_PRIMARY are received
whenever another client acquires the primary selection.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Remove X atom CANTERA_PASTE

We can just as well use XA_PRIMARY as the property name, and avoid polluting
the global atom namespace.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>