ctp:posmgr: add cos_flag to close long/short position

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>