Script: simplify encryption, try to avoid getting stuck

Remove fork() from encryption, by passing shared fd to openssl
instead of named pipes. If the fork() failed for any reason in
encrypt(), the openssl process would block forever waiting for data
in the pipe.

Also fix a situation where if the first fork() in send_to_api()
failed, script would not retry ever again as the global $forked
variable wasn't reset.

This should hopefully fix murgo/IrssiNotifier#161