plugins/alarm_curl ehancement

Fixed following problems:
1) SMTP support isn't compiled
2) libcurl hang due to invalid input size
3) coredump caused by race condition
4) other minor fixes

plugins/airbrake and plugins/alarm_xmpp suffer same race condition. Hopefully I'll have time to fix them later.