Only pass strings to mysqli::real_escape_string

HHVM will throw a fatal error when passing integer and other non-string
values to mysqli::real_escape_string.  A bug has been filed against
hhvm as https://github.com/facebook/hhvm/issues/1782.

Change-Id: I80eccbe8d872e74b8efc9b8c8f37ebce756bdcee
Merge "Only pass strings to mysqli::real_escape_string"