Committing the APIs set preference and unset preference

Committing the other two APIs
1. setpreference
2. unsetpreference
Along with the modified test.html for testing