Fix boolean integer bug

This fixes a regression introduced in 4e41d22 by @maximchick, merged by me (sorry!) and flagged in #1072 by @colinux for `BooleanInput`.

Booleans are normally stored in the DB as an `Integer` (e.g. `1` for `true`) and by default, the checked and unchecked values for a boolean are a `String` (e.g. `"1"`). This meant we were comparing `1 == "1"` (`false`) and not checking the box when we should.

After fixing up a dirty output buffer in the specs that had me chasing my tail for a bit, I added a failing test and finally a fix which ensures that we're comparing an `Integer` to an `Integer`.

This will need to be merged into 2.3-stable (with a new release 2.3.1) and 3.0-stable (with a new RC), so I'd love some eyes on this before I push the button.