Implement AUTO_FREE flag for thread_create
posix: add pthread wrapper