HACK "memory leak" of ly_errno in main thread
HACK "memory leak" of ly_errno in main thread

It wasn't actually a real memory leak, there was just still reachable
dynamically allocated memory on process exit, because the destructor
registered by pthread_key_create() in the main thread isn't executed
on process termination but only on thread termination (i.e. on
pthread_exit()).

So, on Linux, we are going to use static memory for the main thread's
ly_errno.

Fixes #15

PavolVican/libyang,lukasmacko/libyang,PavolVican/libyang,lukasmacko/libyang,PavolVican/libyang,PavolVican/libyang,PavolVican/libyang