Merge branch 'release/1.2.5' into develop
Fix double free for evthr at shutdown

If you use threads, than you get this segfault.

There was two calls to evthr_free() on shutdown:
- _evthr_loop() (droped in this patch)
- evthr_pool_free()
Merge branch 'fix-double-free-for-evthr-v2' of git://github.com/azat/libevhtp into azat-fix-double-free-for-evthr-v2
Workaround for odd recv()'s being done when not requested.

* For some unknown reason (for now), libevent will do a second recv() when data
  is available on a socket. This recv call will return 0, which triggers
  libevent to execute the event callback with the flags 'BEV_EVENT_EOF | BEV_EVENT_READING)'
  To work around this temporarily until the real problem is found (why we have
  double reads)

* Also added paused = 0 when resume() is called.
cleanup
Only return from BEV_EOF|READ if errno is EAGAIN

In a prior commit, I attempted to fix some socket handling errors but returning
if the events in the event callback were BEV_EVENT_EOF | BEV_EVENT_READING. In
most cases this would match for any type of socket error, resulting in resources
never being free'd or sockets never being closed.

This patch will check the value of errno for EAGAIN (recv returned 0), and only
immediately return if the branch is true.
Add connection-specific rate-limiting function.

- added evhtp_connection_set_ratelimit() which is just a wrapper around
  libevent's rate-limiting api.
Fix compilation without threads support

Add missing #ifndef EVHTP_DISABLE_EVTHR
Fix compilation without regex support

Fix typo in CMakeLists.txt (DIABLE -> DISABLE) and add missing define
to compiler flags.
Fix crash when unable to bind socket with TCP deferred accept

If libevent is unable to bind to socket and USE_DEFER_ACCEPT is
configured it will segfault while trying to set TCP_DEFER_ACCEPT flag
on a socket. Fix it by checking if binding succeeded before attempting
to set the flag.
Add missing call to SSL_CTX_free() in evhtp_free().
Merge pull request #99 from rraptorr/fixes

Fix compilation without regex and threads
Malloc with 1 instead of sizeof(char) to avoid warnings
Merge branch 'master', remote-tracking branch 'origin' into develop
Don't check for bevssl if EVHTP_DISABLE_SSL enabled
Use SSL_OP_NO_COMPRESSION if possible

Use SSL_OP_NO_COMPRESSION if OpenSSL library supports it instead of
clearing compression methods stack.
Support for DH parameters file

DH parameters are required for DH key exchange providing forward
secrecy. While ECDH is a better alternative, older clients don't
support ECDH, while DH support is fairly common.
DH parameters are stored in a file and can be generated by openssl:
dhparam -out dhparams 1024
Use proper #ifndef for ECDH (OPENSSL_NO_ECDH instead of OPENSSL_NO_EC)
Merge pull request #102 from rraptorr/tls

Small TLS improvements
Build evhtp-config.h to make things easier to link