Use infinity instead of 3000-01-01 as max date.

This fixes the y3k problem in Discourse that made topics with pins
appear after threads updated in year 3000.
Add unit tests for testing if infinity as highest_date works.
Fix ordering of posts in posts in order unit test.
Merge pull request #2644 from xfix/y3k

Year 3000 problem while displaying thread pins.