These changes refactor some storage code and add a feature to determine
and store the longest duration a user has spend on a tab since using the
extension.