`hasmessages` not necessary after all, got `$if(messages)$` working

I realised now that `hasmessages` is not necessary after all. I modified `filledPageTemplate` to only set the `messages` template variable when `pgMessages` is non-empty.

Now the `$if(messages)$` conditional in the original `content.st` works as expected, so this commit switches that back to the original.