Checkstyle publisher did not honor 0 values

The Checkstyle publisher would not honor value of 0 and instead emit
an empty XML element.  This was due to the 'if someval' which would be
false whenever someval is 0.  Adjusted tests to match the new (and
correct) behavior.

While at it slightly simplified the repeating logic in checkstyle
publisher.

Change-Id: I7443b93aa116dc049de565ff96ca40526b390409
Merge "Checkstyle publisher did not honor 0 values"