Fix WDDX formatted output

WDDX formatted output was blowing up if a boolean crept into the result
data.

Also, the tests for "isHtml" were backwards, so it was inserting the
whitespaces for the unformatted output and leaving them out for the
formatted output.

Change-Id: I719d84c59cf25e5de6fcd6e914a50e4ba8938899
Merge "Fix WDDX formatted output"