Added functionality for supporting winlock pause

The library now opens a new hidden window for listening
to change in session (e.g. lock).
Added mutex for controling access to lastKeycode

After adding the new hidden window(a new thread) it's
two threads that can access lastKeycode at the same time.
Therefore it's now added a mutex for controlling access to
this shared variable.