Enable AgentLog to handle a message with invalid byte sequences.

Use `String#scrub` which is new in Ruby 2.1 and add the `string-scrub` gem for older rubies.

Addresses #286 and #613.