[FIX] im_chat : use direct sql query on im_search method for perfomance issue
 and fix away status