iv_inited: Don't call pthread_getspecific() on an uninitialized key.
iv_inited: Don't call pthread_getspecific() on an uninitialized key.

If __thread isn't available, and iv_init() has not been called yet
in this process, we will not have allocated a thread local storage
key yet, and calls to iv_get_state() will call pthread_getspecific()
on an uninitialized key.

This is not a problem for most users of iv_get_state(), except for
iv_inited(), since it is allowed to call iv_inited() without having
initialized ivykis in this process or thread.  Therefore, add a
check to iv_inited() to catch this case, and return 0 as expected.

Signed-off-by: Lennert Buytenhek <8858498612e3a522354216649776e3032dcb7e5b@wantstofly.org>

buytenh/ivykis,buytenh/ivykis