Check for other representations of true and false

Checkbox values come in as `'0'` and `'1'`. Use ActiveRecord to cast these values to their proper boolean value.
While looking into my `column_for_attribute` method, I noticed that @seangriffin had [deprecated](https://github.com/rails/rails/commit/ae96f22) some related code, which would cause this to break for virtual attributes.

While chatting with him, he pointed out that `value_to_boolean` had been removed in 4.2 and that for that version I'd need to use a (probably still private) api, [`ActiveRecord::Type.type_cast_from_database`](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/type/value.rb#L19-L24), which doesn't seem like that much fun.

So instead, I'm going to duplicate the [logic behind that method](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/type/boolean.rb#L10-16) as it seems like the most stable way.

Come Rails 5.0, when ActiveRecord::Type is more likely to be in the public interface, we can perhaps revisit this.