Decode '0'-valued user options to integer 0
I13d0e402f fixed a MySQL strict-mode bug by having boolean false be
sent to the database as 0 rather than "", since so many of our
logically-boolean fields are typed as tinyints. That happened to also
cause logically-false user preferences to be stored in the
user_properties table as "0" rather than "", which works fine in PHP but
confuses JavaScript since it considers string-0 as truthy rather than
falsey.
To avoid this situation, convert "0" to 0 when loading the user
options. Completely solving T54542 is left for another time, since
identifying which type to normalize each option to seems nontrivial.
Change-Id: Ia3280b7ce923641eac077141b47cba10d3fb88db