Bug fix in code that tested if serializer is handling tpl content.

Discovered a bug (reduced test case from en:3D secure) RTing the snippet
below:
-----------
<ref>{{cite web|url=http://blah|title=Visa|format=PDF|date=|accessdate=2010-08-11}}</ref>

<references />

foo
-----------

All content after the <references /> tag was being ignored which
was because the serializer thought it was still handing template
content.  For some reason, this same code was working before the
refactoring, but that must have been a weird effect of checks
between null and empty string.  The current patch is more robust
and more explicit.

Eliminates RT error from en:3D secure (and possibly from many other
pages being rt-tested).

Change-Id: Iff5ea6590ebc84e91491c7a228b0b90bc30e880f