libwebm: Pull from upstream

Rolling mkvparser from upstream. Primarily for fixing a bug on parsing
failures with certain Opus WebM files.

Upstream commit hash of this pull: 574045edd4ecbeb802ee3f1d214b5510269852ae

The diff is so huge because there were some style clean ups upstream.
But it was ensured that there were no breaking changes when the style
clean ups was done upstream.

Change-Id: Ib6e907175484b4b0ae1b55ab39522ea3188ad039
long mkvparser::UnserializeInt(
  if (size_ >= LONG_MAX)  // we need (size+1) chars
    return E_FILE_FORMAT_INVALID;
 
  const long size = static_cast<long>(size_);
 
  str = new (std::nothrow) char[size + 1];
 
  if (str == NULL)
    return -1;
 
  unsigned char* const buf = reinterpret_cast<unsigned char*>(str);
 
  const long status = pReader->Read(pos, size, buf);
 

long mkvparser::UnserializeInt(
    IMkvReader* pReader,
    long long pos,
    long size,
    long long& result)
{
    assert(pReader);
    assert(pos >= 0);
    assert(size > 0);
    assert(size <= 8);
 
    {
        signed char b;
 
        const long status = pReader->Read(pos, 1, (unsigned char*)&b);
 
        if (status < 0)
            return status;
 
        result = b;
 
        ++pos;
    }
 
    for (long i = 1; i < size; ++i)
    {
        unsigned char b;
        const long status = pReader->Read(pos, 1, &b);
        if (status < 0)
            return status;
        result <<= 8;
        result |= b;
        ++pos;
    }
    return 0;  //success
}
