rewrite base library from binary to type converter style

New version use []byte type conversion instead of
binary.MarshalBinary/binary.UnmarshalBinary
take care of SIGINT
improve error log
improve idle time gc