update comment
Calculate the right key

Calculate the key when initializing cipher algorithms, since it's only
need to be calculated once. Also cipher ctx need to be initialized
only once in one connection, change it to be consistent with other
shadowsocks servers.
stream ciphers don't need the final functions, since they have no padding.
add debug function

Add a wrapper function to BIO_dump_fp() for debugging.
remove unnecessary link state

Function check_cipher() is optimised so the two states can be removed.
update log related functions

Remove some unneeded log, also change the log level in some functions.
comment out some checks

That warning seems only generate noise and doesn't help anyone.
change macro name

Inactive is more accurate to describe the meaning of this macro.
add sanity check to destroy_link()
update log message
fix the wrong assignment

This assignment is an overflow and will damange the ln->next pointer.
suppress some info messages

Change them to debug level, and make some codestyle change.
tweak the default value

Maybe it's better to let them be set through command line, but this
program is mainly for router, so available memory isn't too much. The
default value will let the program cost ~8MB at most.