Add support for additional preference types

We've added validation for booleans, ints, and strings that look like
ints. This ended up being a little more complicated than expected,
since there's not much help in the way of determining the type of a
string.