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.