Add generic AbstractPrefField

Write null to preference resets the preference to the user defined default value.