Change compile options for MinSizeRel
Remove "OES" extensions from GL functions when using GetProcAddress
Provide better implementation of localeconv and fix logic error in allocate

This allocates more space to the structure returned by localeconv. This fixes
an error caused by some locale functions (specifically moneypunct_byname::init
trying to access members of the lconv struct beyond the first and dereferencing
invalid pointers. This also fixes a bug in allocate() which occurred when
allocating a single-typed array of data of type size greater than one byte.
The function had been incrementing its index into the array by the byte size,
causing it to skip elements in arrays of larger type sizes. Fixes issue #2134.
Correct syntax of allocate function

Fix mistaken syntax for use of allocate and restore original, very strange syntax.
Formatting fix and add test
Fix indentation in localeconv
Merge pull request #2139 from TV4Fun/memfixes

Fix errors in locale and allocate, and a few other tweaks