Fixed/Improved the items model (a) improved ordering by ordering
attribute to show latest item first if items have the same ordering. (b)
fixed an SQL query in post installation checks, causing SQL error about
column grouping in some MySQL versions