BUG: Coverity 1130670: Buffer not null terminated in GE4ImageIO

Manually null-termininating hdr->filename fixes a legitimate bug. The other
4 statements are logically unnecessary, but will make Coverity and possibly
some compilers happy.

Change-Id: I0cdcaa8629e2be1884ce5ffdc18e248345fdcfe5
BUG: Coverity 1081547: Uninitialized pointer field in ConnectedRegionsMeshFilter

Change-Id: I1c9d8b6eae78ef60fdd44de76b9efb2bc4e2c5e8
STYLE: Coverity 40ee44a9: Self assignment in VoronoiSegmentationImageFilterTest

This should prevent warnings in both GCC and Coverity.

Change-Id: Ic18e7b560fdb0bc7defdfda49476f32bde933771
BUG: Coverity 1081019: Improper use of negative value in StringTools

It's logically impossible for find_last_not_of() to return string::npos in
this function, so the Coverity warning is strictly a false positive.
However, relying on this assumption makes the code less maintainable.

Reimplemented Trim() to simply call TrimLeft and TrimRight in succession.
This reduces code duplication and does not increase the computational
complexity of the function.

Updated the test to test Trim() more thoroughly.

Change-Id: Ie62056f50ceac7362d225c98da59368eab2ea944
Merge topic 'cov_1081547'

429459bd BUG: Coverity 1081547: Uninitialized pointer field in ConnectedRegionsMeshFilter
Merge topic 'cov_1081019'

88cb9563 BUG: Coverity 1081019: Improper use of negative value in StringTools
Merge topic 'cov_40ee44a9'

c8573737 STYLE: Coverity 40ee44a9: Self assignment in VoronoiSegmentationImageFilterTest
Merge topic 'cov_1130670'

246ec337 BUG: Coverity 1130670: Buffer not null terminated in GE4ImageIO