Added test for the #23070 problem
Fixed code to solve #23070 problem

Added a class to wrap callable in settings:
* Not to call in the debug page (#21345).
* Not to break the debug page if the callable forbidding to set attributes (#23070).

Thanks @bmispelon for giving me some advice.
Merge pull request #2967 from hirokiky/fix23070

Fixed #23070 -- not to break the debug page by callable setting with __slots__