Fix breakage of SQLite ResultWrapper due to r45769. The "result" member in SQLite is actually an array and so passing by value to DatabaseSqlite::fetchObject() makes it fail to iterate. We can't really pass it by reference since that's an E_STRICT error due to a parameter type mismatch with Database. Pass the ResultWrapper instead.
This means that nothing at all should be passing bare result objects/arrays to Database*::fetchObject() anymore. The "instanceof ResultWrapper" logic can be removed in a subsequent commit. It can stay in this one for now for safer backport to 1.15.