Convert preferences to use IPreferenceStore

The old code used a deprecated method to store preferences. I've updated it to use IPreferenceStore which admittedly is not the latest and greatest way of storing preferences but should work with the Eclipse 3.x line, too.