Fix Bug 734185 - Python debug_plugin_message results in AttributeError or wrong file/line

Before overwriting the `frame` local variable, check that `frame.f_back`
is not None. Also, change the `num_back_frames` argument to get_trace_info()
in the debug_plugin_message() override from 2 to 1 because the @override
decorator had one level of indirection removed.