mapi: rewrite u_current_init() function without u_thread_self()