Add SessionTestCase class for session tests.
Add infolist to WeeChat mock.

Also add commands and config_integer_default.
Add tests for log level restoration.