lib/perl5db.pl: refactor all calls to IO::Handle via ->autoflush to a short local function.

This hopefully resovles https://rt.perl.org/rt3/Ticket/Display.html?id=116769
and any issue similar to that which I may not have been unlucky enough
to fall upon.
lib/perl5db.t: Add test for bug #116769, Frame=2 crashes debugger
lib/perl5db.t: Add test for bug #116771, autotrace crashes debugger
lib/perl5db.pl: Workaround rt#116771 by putting DB::Obj inside BEGIN { }