wfBaseConvert(): Work around PHP Bug #50175

Before php/php-src@834daa455bc9, PHP's gmp_init() function would try
to autodetect hex and binary numbers even when a base was explicitly
specified[1], so the results for some base-36 numbers having leading
zeros could be incorrect. Work around this bug by trimming off any
leading zeros before calling gmp_init().

[1]: https://bugs.php.net/bug.php?id=50175

Bug: 69249
Change-Id: I5f5458c1a1195f55fa12904c103da6ea7558010a
Merge "wfBaseConvert(): Work around PHP Bug #50175"