Refactor NioProcessor and NioSessionBase related sources and fix bug of
data transfer with Nio.