Reduced calls to db:flush() to reduce stuttering

Added a flag to track if the options db needs to be udpated, this
reduces the number of calls to db:flush() while navigating the options
menu, thus reducing UI stuttering.
Merge pull request #1270 from Protuhj/options-stutter

Reduced calls to db:flush() to reduce option menu stuttering