Fix 436, and also fix a threading issue WRT profiles

Turns out that directly calling functions from objects owned by a different thread is A Bad Idea™. It's a minor miracle qTox didn't crash whenever any profile switch occurred.