use log2() / log10() within basic log function

... to reduce rounding errors

see #337

This PR implements the use of `log2` / `log10` into PHP's `log` function:

`log(x, 2)` calls `log2(x)`
`log(x, 10)` calls `log10(x)`
`log(x, y)` calls `log(x) / log(y)` (as before)

Should the PHP function `log10()` be deprecated? Because `log10(x)` is the same as `log(x, 10)`.