Make user preferences accessible by plugins

Add methods to the JavaScript API that allows plugins to get and
refresh the preferences of the currently signed in user.

Change-Id: Icabaf8188ccdd19b877856a23d292493cd50a215
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/Documentation/js-api.txt b/Documentation/js-api.txt
index 43e4336..4e10b2b 100644
--- a/Documentation/js-api.txt
+++ b/Documentation/js-api.txt
@@ -65,6 +65,15 @@
 Returns the currently signed in user's AccountInfo data; empty account
 data if no user is currently signed in.
 
+[[Gerrit_getUserPreferences]]
+=== Gerrit.getUserPreferences()
+Returns the preferences of the currently signed in user; the default
+preferences if no user is currently signed in.
+
+[[Gerrit_refreshUserPreferences]]
+=== Gerrit.refreshUserPreferences()
+Refreshes the preferences of the current user.
+
 [[self_getPluginName]]
 === self.getPluginName()
 Returns the name this plugin was installed as by the server