cleanup old code part1

- replace rc4 with libsodium's stream cipher (xsalsa20)
- remove unsafe and old shadowcrypt algorithm suppport
- cleanup some code
- stick to c99 standard but build with ansi standard
- remove old test case