added 'add_sleep_thread' method, which inserts a thread to sleeping thread list in order of ticks remaining