More security fixes for capabilities

This patch fixes a security issue which would allow an attackant to set bytes to 1 at choosen places.
It also fixes a warning when DEBUG_CAPABILITIES is set.
Merge pull request #1640 from hardening/capafix2

More security fixes for capabilities
Fix CVE-2014-0791

This patch fixes CVE-2014-0791, the remaining length in the stream is checked
before doing some malloc().
Merge pull request #1656 from hardening/CVE-2014-0791-v2

Fix CVE-2014-0791
add additional evdev key mappings for multimedia and Korean keyboards
Merge pull request #1662 from dpoe/master

Add additional evdev key mappings for multimedia and Korean keyboards
Added auto reconnect to FreeRDP core and X11 client
Fixed tls_read and tls_write to prevent a subsequent crash in SSL_shutdown when read/write errors occur.
Modified TLS code to handle disconnects a little cleaner.
Fixed comment in tls_disconnect.
Revert "Fixed comment in tls_disconnect."

This reverts commit 7f040406acca031d9e7f2e8c397a8348e13e9db9.
Revert "Modified TLS code to handle disconnects a little cleaner."

This reverts commit c273a4ac5e7cca51fc7dbdc10a683227bb164120.
Revert "Fixed tls_read and tls_write to prevent a subsequent crash in SSL_shutdown when read/write errors occur."

This reverts commit 2a4923835143b4196ca7cafdaece687e93e79beb.
Modified FreeRDP core to ignore SIGPIPE signal.  This signal was being generated during a call to SSL_shutdown when the socket is in a disconnected state.  The proper way to handle this is to ignore SIGPIPE and allow the write system call to report an errno of EPIPE.
Added #define for SOL_TCP to fix compilation error on iOS
Changed #define for SOL_TCP to be IPPROTO_TCP instead of 6
xfreerdp: handle negative mouse coordinates

If the pointer is moved out a window relatives coordinates can get negative
in X. This case wasn't handled.

fixed #1654
Merge pull request #1668 from bmiklautz/issue_1654

xfreerdp: handle negative mouse coordinates
Merge pull request #1664 from vworkspace/auto-reconnect

Addition of auto reconnect to FreeRDP core and X11 client