PLAT-170 Log sample of SQL queries w/ WikiaLogger

https://wikia-inc.atlassian.net/browse/PLATFORM-170

Inserted random (at a rate of 1%) sampling of SQL queries in DatabaseBase around doQuery. The instrumentation adds the query, the execution time, the function, and the server role to the log payload. With this in place, we can query using Kibana for the URL, the query string, the server, the db name the calling method:function, and the elapsed time.

There was some existing profiling happening using `MWDebug::query()` which was left intact. To keep the already extremely long `query()` method from expanding, I moved the instrumentation and logging into a wrapper function called `executeAndProfileQuery()`.

To enable sampling a Bernoulli trial class is being added under `\Wikia\Util\Statistics\BernoulliTrial`. This class allows you to randomly sample events at a specified rate. For example, if a developer wanted to sample an event 1% of the time they could:

```PHP
$sampler = new BernoulliTrial(0.01);
if ($sampler->sample()) {
   // do something 1% of the time
}
``` 

/cc @Wikia/platform-team 
> Since the trials aren't stateful, is there any reason to create an object versus using a static method e.g.

Yes. As a general purpose library I think it should be built in such a way that it does not preclude testing. As a static method on a class it can't be mocked (as far as I know) which would make testing around it very difficult.

I'm not providing a good case in point here :/. I'll refactor it and add a test to demonstrate what I'm talking about.