Add a ringbuffer implementation targetting byte sending

This adds a ringbuffer implementation that targets bytes sending.
The ringbuffer can grow when there's not enough room, that's why it's
not thread-safe (locking must be done externally). It will be shrinked
to its initial size as soon as the used bytes are the half of the
initial size.
Print function name when emiting an error
Fix OOM situation
Allow transport_write calls to be non-blocking

This big patch allows to have non-blocking writes. To achieve
this, it slightly changes the way transport is handled. The misc transport
layers are handled with OpenSSL BIOs. In the chain we insert a
bufferedBIO that will bufferize write calls that couldn't be honored.

For an access with Tls security the BIO chain would look like this:
  FreeRdp Code ===> SSL bio ===> buffered BIO ===> socket BIO

The buffered BIO will store bytes that couldn't be send because of
blocking write calls.

This patch also rework TSG so that it would look like this in the
case of SSL security with TSG:
                                         (TSG in)
                              > SSL BIO => buffered BIO ==> socket BIO
                             /
FreeRdp => SSL BIO => TSG BIO
                             \
                              > SSL BIO => buffered BIO ==> socket BIO
                                        (TSG out)

So from the FreeRDP point of view sending something is only BIO_writing
on the frontBio (last BIO on the left).
Make ringbuffer C89 aware for VC
Fix some corner cases in ringbuffer and make unitary test have no leak
Updated license headers
Fix ringbuffer_write() to use const BYTE * instead of const void *
Fixed invalid declaration and missing argument
Add .gitignore files for test generated files
Correctly export ringbuffer function and fix a warning
fixed missing extern C for cpp in makecert.h
winpr: fix test compilation on Windows
Merge pull request #1857 from FreeRDP/mh-makecertfix

fixed missing extern C for cpp in makecert.h
Merge branch 'master' of github.com:FreeRDP/FreeRDP
Merge branch 'non_blocking_writes' of github.com:hardening/FreeRDP into non_blocking_writes
freerdp: fix compilation on Windows
libfreerdp-core: fix tcp_new on Windows
Merge branch 'master' of github.com:awakecoding/FreeRDP into xcrush
libwinpr-thread: fix compilation on Android