Optimize refreshPreferences method

* Optimize method logic to not process too many things unnecessarily
Optimize createText method in TrafficView

* Reduced redundant code by refactoring and moving to separate
common-use method
* Speed calculation and formatting is now only done when enabled (more
efficient)