Moved SettingsActivity and WebGuiActivity to gui folder.
Preferences code cleanup.
Added native main activity with tabs for repos and nodes.
Fix crash on start after improper shutdown (fixes #18).