Clean up chpl_format() a little bit.
Clean up chpl_format() a little bit.

[Patch by Greg and Mike; review by Mike and Greg.]

This commit was primarily intended to address a coverity gripe (CID
1212420), namely the missing va_end() call.  It adds that.  While here,
I also improved the vsnprintf() call by removing the dependence on the
explicit element count with which the receiving buffer was declared and
the potential waste of the last byte of that buffer.  Mike reviewed the
result, spotted that the test of the vsnprintf() return value was wrong,
and wrote a corrected version.  I reviewed that correction.

It was sort of a time-shared form of pair programming.


git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@23598 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,sungeunchoi/chapel,chizarlicious/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,sungeunchoi/chapel,chizarlicious/chapel,sungeunchoi/chapel