bugfix: double close error socket.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>
add: way of cross-platform null device creation in common;
workaround: use null device as down-stream for Transform to make it faster;
fix: distinguish history state from DataSocket and MsgSocket.

Signed-off-by: liuyanghejerry <liuyanghejerry@126.com>