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.
...oh, right. I'm an idiot, ignore me.

By the way, would this be nicer if structured as a switch statement?