fix a typo in memcpy
Add some options to build clean or debug library
Fix some issues in PacketStream and PacketHandler, also add the #ifdefs to the header files