RUBY-1182 Method to validate an object can marshal
RUBY-1182 Sanitize environment report

We've seen problems with monkey-patches to ActiveSupport's JSON encoding making
us fail when serializing the EnvironmentReport on connect. Since we don't want
the connect to fail for non-critical information, we check whether we can
serialize and exclude the environment report data if it wouldn't get through.
RUBY-1182 Log from valid_to_marshal

This lets us get the exception information which will be useful for context
that we can't provide where we originally were logging.

Additionally append the caller if we're seeing a SystemStackError since it's
backtrace is bunk.
RUBY-1182 Coerce Rails.env to string

Certain versions of Rails return an ActiveSupport::StringInquirer rather than a
String. Additionally we've seen monkey-patches to JSON encoding that then work
poorly with that class.

Coercing the Rails.env to a String via to_s takes insulates us. If we find lots
of other cases where other types need coercing we may look for a generic
solution, but that doesn't seem necessary at this point.
Merge pull request #419 from newrelic/RUBY-1182-infinite-recursion

RUBY-1182 Fix for errors during environment report marshalling
Reload rules file on init of Proxy so first request gets rules
Merge pull request #420 from newrelic/fix-flaky-proxy-rules-loading

Reload rules file on init of Proxy so first request gets rules
RUBY-1277 Add support for Puma 2.8.0

Puma 2.8.0 renamed the ``worker_boot`` option to
``before_worker_boot``[1]. This commit detects which option name is in
use and adds a hook to the correct one.

1: https://github.com/puma/puma/commit/e5150f07927e96aa5aae8a65db116472de1d9d63
RUBY-1279 Clean up loading of Cli::Command subclasses
Better backtraces for SystemStackError

We've seen cases where a SystemStackError results in a small, unuseful
backtrace.  This commit updates our general exception logging to properly deal
with that, using caller instead of the Exception#backtrace, and doing a bit of
munging to remove levels from the stack that result from our logging code.
Merge pull request #423 from newrelic/system_stack_error_logging

Better backtraces for SystemStackError
Merge pull request #421 from newrelic/RUBY-1277-puma-cluster

RUBY-1277 Add support for Puma 2.8.0
Merge pull request #422 from newrelic/RUBY-1279-commands-load-order

RUBY-1279 Clean up loading of Cli::Command subclasses