[ticket/12966] Sort posts by post_id in addition to sorting by post_time

This should make sure that posts with the same post time are properly sorted
on database backends like postgres.

Ticket: https://tracker.phpbb.com/browse/PHPBB3-12966