[ticket/12966] Sort by post_time and post_id where applicable

This change was not applied to the search as this would require a larger
rewrite of the search methods.

PHPBB3-12966
Merge pull request #2865 from marc1706/ticket/12966

[ticket/12966] Sort posts by post_id in addition to sorting by post_time
Merge branch 'develop-ascraeus' into develop

# By Marc Alexander
# Via Dhruv Goel (1) and Marc Alexander (1)
* develop-ascraeus:
  [ticket/12966] Sort by post_time and post_id where applicable
  [ticket/12966] Sort posts by post_id in addition to sorting by post_time