wayland: Move ownership of the libinput thread to InputRedirection
When libinput tears down, it may access the Session object. This change re-jitters the shut down logic so the Session object is guaranteed to be valid when libinput stuff gets destroyed.
Edited by Vlad Zahorodnii