lower case 'l' for libtorrent in user_agent string
Fix gettext setup in test_common and log in test_transfer so tests run standalone

Add extra tests to test_config
Run the test files through flake8 to tidy up code
Handle plugin info not available
Removed call to save_config in path-chooser (obsolete)
Fixup saving and loading state files

 * All state files have a backup created before saving
 * The backup will now be used if saving or loading fails
 * GTKUI state files stored in new gtkui_state dir and common load/save functions created
 * Detects bad shutdown and archives timestamped state files in separate config directory.
Fix typo in authmanager
Fix mistake in torrentmanager
Fix #2303 : Torrent state not updated until after emitting TorrentFinishedEvent
Cleanup torrentmanger code

 * Remove legacy/old state file code
 * Passes flake8 cleanly
 * Most pylint messages dealt with
 * Code now uses >=Python 2.6 'with' and 'as' statements
Add flake8 to setup.cfg and add missed change to #2303 fix