Bug 1039219 - Migrate all snippets for preferences in Makefile to preferences.js r=gduan

Conflicts:
	build/preferences.js
Merge pull request #21809 from yurenju/preferences

Bug 1039219 - Migrate all snippets for preferences in Makefile to preferences.js r=@gduan