Use LEFT JOIN for SQLite compatibility

SQLite does not implement RIGHT JOIN, but it does implement LEFT JOIN:
http://www.sqlite.org/omitted.html

Because of this, Special:NewMessages gave an SQL error.

This commit swaps the RIGHT JOIN for a LEFT JOIN and joins the other
table, so should give the exact same results.

Bug: 39064
Change-Id: Iddeb854cfc96e37d4643d0f6ddb72d3f4ea97bd8
Merge "Use LEFT JOIN for SQLite compatibility"