MDL-45214 always try to use ID sort in get_events_select()

This should make PostgreSQL behave more like MySQL
and resolve the problem when events were appearing in different
order.