Improved logarithm of base 2 and 10 of standard math functions

... to reduce rounding errors.

Internally on `log(x, 2)` the native `C` function `log2(x)` and on `log(x, 10)` the native `C` function `log10(x)` will be called.

Because of after this PR the following will be the same in PHP `log10(x)` === `log10(x)` the function `log10` is needless and could be deprecated/removed. I will create an RFC if this PR was merged.

This PR is against PHP-5.4 as there is no BC break.
Please merge into PHP-5.4 up to master.
Please tell me if I did something wrong.
because of it's an error condition that shouldn't be the normal case. So on calculate one of the pre-defined base logarithms the one operation to check against <= 0 isn't needed.