add urlencode to do inplace encode

Signed-off-by: xiehuc <xiehuc@gmail.com>
fix discu message find with a wrong id (pidgin-lwqq #527)

Signed-off-by: xiehuc <xiehuc@gmail.com>
disable detach thread for stability, open DISCU_READ_DB for test

Signed-off-by: xiehuc <xiehuc@gmail.com>