Repaired incorrect database factories

The prototype for the database factory had changed from a set of const
char *s to a set of const std::string&s, but I hadn't updated the function
definitions.  Each of the arguments was getting an extra nonprintable
character prepended to it, and all connections were failing.