refactor/fix switching profile with separate settings
minor tweaks
check for non-existent file
more file open checking
when loading, try using main password for history
fix clearing duplicate passwords
fixes dubslow/qTox#2
fix loading an encrypted chat log failing