Fixes table order in SQL FROM clause, fixes offset

Since "sqlPermissionChecking" and other "FROM" clauses use "INNER JOIN" statement,
and "ON" statement use "ezcontentobject" table, the declaration of ezcontentobject
have to be written before other clauses.

Further, the use of "offset" in eZDB::arrayQuery() method return array with
the same offset in keys, we can not have $row[0]
comma should be on the prior line
Merge pull request #12 from achasseux/fixes_suggest

Fixed EZP-20503: fetchNodeByRating : Fixes table order in SQL FROM clause, fixes offset