riemann: Refactored worker_init, extracted methods for adding fields to event.
riemann: Skip empty fields

When adding properties to an event, skip empty fields before trying to
do any type casting. This allows metric(int("${foo:-}")
state("${state}")) to work correctly, and skip the metric field if it is
empty, and therefore fixes #258.

Reported-by: Fabien Wernli
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
Merge pull request #278 from talien/f/riemann-skip-empty-fields

riemann: Skip empty fields