Fix failure of tests with fluentd v0.10.56

Tests fail with fluentd 0.10.56.
Please look at https://travis-ci.org/shoichikaji/fluent-mixin-plaintextformatter/builds/40542779

The reasons for failure are:
* Since this commit (https://github.com/fluent/fluentd/commit/1f403c0),
`Fluent::Config::bool_type(nil)` returns `true`.
So `first_value(Fluent::Config::bool_type(conf['foo']), false)` returns unexpectedly `true` when `conf['foo']` is not set.
* Now plugins have `log` method, so the tests using `$log` fail.

This patch
* define our `bool_value` function.
* take care when `log` method is defined.