Remove the legacy makefile based build system

The new one is much more flexible. The old one is unmaintained.
Merge the encoder/decoder crt_util_safe_x.h into the common lib
Don't manually null terminate after calling SNPRINTF

The following pattern is unsafe on all platforms:
 n = SNPRINTF(buf, ...);
 buf[n] = '\0';

On windows, the _snprintf variants return a negative number
if the buffer was too small, thus buf[n] would be outside
of (before the start of) the buffer.

On other platforms, the C99 snprintf function returns the
total number of characters which would have been written if
the buffer had been large enough, which can be larger than
the buffer size itself, and thus buf[n] would be beyond the
end of the buffer.

The C99 snprintf function always null terminate the buffer.
These invocations of SNPRINTF are within !WIN32, so we can
be sure that the SNPRINTF call itself already null terminated
the buffer.
Fix buffer size checks when appending using SNPRINTF/WelsSnprintf

Checking iBufferLeft > iBufferUsed does not make sense, since
this would stop writing into the buffer alredy after the buffer
is half full, when there is less space left than has been used.

The right check is iBufferLeft > 0.
Fix calculating buffer positions when appending with SNPRINTF/WelsSnprintf

This fixes two separate issues.

First, with the MSVC _snprintf implementations, the return value
is negative if the buffer wasn't large enough - this would in
the worst case lead to making iBufferUsed negative, writing before
the start of the buffer.

Secondly, when both iBufferUsed and iBufferLeft are accumulated,
one can't do "iBufferLeft -= iBufferUsed;". As an example,
say the buffer is 100 bytes in total and iBufferLeft is 40 and
iBufferUsed is 60. If SNPRINTF then writes 5 more bytes to the
buffer, iBufferUsed would be 65, but if we now do
"iBufferLeft -= iBufferUsed;" then iBufferLeft would end up as
-25 even though there's 35 bytes left in the buffer to use.

Therefore, we use a separate variable to store the return value
from the latest SNPRINTF call. This is checked to make sure it
wasn't negative, and only this amount is added to iBufferUsed
and subtracted from iBufferLeft.

This is the same pattern used in codec/encoder/core/src/utils.cpp.

strftime never returns negative numbers, so those calls don't
need as much checking.
Simplify ifdefs in measure_time.h

Instead of using "defined(MSC_VER) || defined(__MINGW32__)" to
indicate the windows platform, just check for the _WIN32 define
instead.

Also remove an unused codepath - the removed codepath would
only be used under the condition
"(defined(MSC_VER) || defined(__MINGW32__)) && !defined(_WIN32)",
and I'm not aware of any environment with MSVC or MinGW that
doesn't define _WIN32, thus this codepath never was used.
Merge pull request #226 from mstorsjo/crt-safe-merge

Merge the encoder/decoder crt_util_safe_x.h into the common lib
Merge pull request #227 from mstorsjo/snprintf-fixes

Fix handling of snprintf return values and buffer size calculations
Merge pull request #225 from mstorsjo/simplify-ifdefs

Simplify ifdefs in measure_time.h
Readd a removed include

This fixes builds without NO_DYNAMIC_VP (such as with the MSVC
project files), the include was removed in d809b7e9.
fix spell error of RcInitGoomParameters
Update the MSVC project files for earlier moved/removed files
Merge pull request #231 from mstorsjo/fix-msvc-build

Readd a removed include
Merge pull request #236 from mstorsjo/msvc-proj-moved-headers

Update the MSVC project files for earlier moved/removed files
Merge pull request #230 from mstorsjo/remove-legacy-make

Remove the legacy makefile based build system
Merge remote-tracking branch 'upstream/master' into travis.osx