add new trimWhitespace() function

see: #2391
add tests for trimWhitespace()

see: #2391
trim whitespace from DMI information

see: #2391
trim whitespace from /proc information

closes: #2391
allow to pass files for testing

see: #2361
tests for new Megacli module

see: #2361
fix breakage introduced by commit #5a0d3cfa

closes: #2361
no need for a variable
invert condition

For unknown reasons, Tie::Registry sometimes introduces empty hash keys
('/'), matching both as a subkey and as a variable.
kill trailing whitespace
no need for a regexp here
reduce indentation level
wrap long lines
fix test files list

closes: #2394
fix compilation
cosmetic cleanup
use DISKSIZE, not SIZE
emulate actual code to fix test
fix expected test results
fix potential warnings with lspv output

See resources/aix/lspv/aix-6.1-hdisk1 for an example of output with
undefined values.

see: #2384