Refactor preference to the DroidplannerPrefs class.

As requested at https://github.com/DroidPlanner/droidplanner/pull/838#issuecomment-47605233.