Small improvements and bug fix for select mode
Unify engine  analysis mode and thinking and make it work independently of game modes; Make toggle buttons save their state.