Added hasmessages template variable.

In the content.st template, there is a conditional $if(messages)$ around the inclusion of the messages.st subtemplate. However, this always evaluates to true, even if the messages list is empty.

I can't find any good documentation for HStringTemplate's conditionals, so I don't know if this is the correct behaviour or not; in any case, I added the hasmessages template variable, which will be set to False when messages is empty. I also modified the content.st template accordingly. Now the messages.st subtemplate is only included when messages is non-empty.
`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.
Merge pull request #405 from duairc/hasmessages

Added hasmessages template variable