Warning cleanup

- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)

Closes #1064
ssl: Don't use global openssl context

Fixes #789
ssl: Use more secure options

This disables ssl 2/3
merger from hexchat master