ctp:ctpagent: make MD agent as a unifrom ctp data interface

1) Update MarketDataAgent as a uniform ctp data interface to
   outside world.
2) Store logs for MD and TD to respective files.
3) Add inc_request_id() for MD agent.

Merged zw-dev 85addef96.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpapi: update CtpMdApi

1) Share the same logger interface with MD agent.
2) Add inc_request_id().
3) Process depth data using agent's callback.

Merged zw-dev 85addef96.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:testctp: update test to md agent

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
misc: add painter module

Add painter module to display contents to terminal window.

Merged zw-dev 4aaf6127.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpagent: display market data in a monitor

1) Display market data with a monitor.
2) Add commentaries for methods in trader agent.

Merged zw-dev 4aaf6127.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:testctp: test start_monitor for MD agent

Merged zw-dev 4aaf6127.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp: move elemmap module to misc

1) Move elemmap.py to misc.
2) Move error.xml to futures.
3) Update ctpagent module because of #1.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp: add mdtolocal module

Add mdtolocal to accelerate accessing the market data.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
dataMgr:data: add ctp data manager

Add ctp data manager (CtpData) which is a calculation
engine for ctp data.

Merged zw-dev 7529dc226.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
dataMgr:data: rewrite methods inherited from Data for CtpData

1) Remove M40() and add M30() for Data.
2) Add moving average methods for CtpData.
3) Add lowestUpToDate() and highestUpToDate() for CtpData.

Merged zw-dev 8840e2e5.

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