add vim's swap files
add some unit tests
add a mock collectd for testing with constant data
replace Regexp::Common with Scalar::Util
clean up Perl style a bit

- Remove some superfluous parenthesis clutter
- Shorten a lot of single-line conditionals using postfix constructions
- Merge variable declarations
- Use $class/$self instead of $pkg/$obj as is customary
- Remove quotes around literal hash keys
refactor common message/response code