New posts pass PostsController sorting function at the top

Following on #3008, it seems the PostsController tries to sort the newly-created post model when the user goes to the `edit.new` route or saves there, when starting out from the main admin screen. This model doesn't have `updated_at` or `published_at` dates, and so will not otherwise pass the sorting function.
imo, the first line of the function in here should be the publishedAtCompare function. Keep var initialization and return logic all in one place (where it currently is), rather than interrupting it with a function declaration.