Optional tor static builds

I need this for portable tor client. This also add optional static builds for openssl and libevent.