Implement a correct RC4 encryption

See https://github.com/clowwindy/shadowsocks/issues/178

This encryption method will significantly improve OpenWRT performance.

Tested with OpenSSL and AppleCC. Didn't test PolarSSL; please test with it.