Use frame object attributes, if provided, for trace_data

This is needed for supporting the better_errors gem’s custom StackFrame.