Simplify implementation of truncateDeep
Simplify implementation of truncateDeep

Also improves handling for recursive objects and arrays

jacobmarshall-etc/bugsnag-js,jacobmarshall-etc/bugsnag-js,jacobmarshall/bugsnag-js,jacobmarshall/bugsnag-js