Fix: handle zero length string in rtrim()

Also adds the trim string definition to utils.h

Signed-off-by: David Goulet <dgoulet@ev0ke.net>