Strip whitespace preference (and CachedPreference [sub]class)

Added preference for stripping whitespace at the end of lines. Created a new CachedPreference class which defines a preference with built in whenLoaded future and easy access to getting and setting (automatically saving) the preference value.