Make focus field for patient search configurable

This adds a new setting in the preferences that allows the user to
specify which of the patient search fields (name, d.o.b., etc.) the
focus should jump to if the view is enabled.

In addition this also makes sure that the user settings for the patient
search view are properly applied, even if the view is already open
before login, or if the user changes while the view is active.
Select one of the user's mandators on login

This was broken, especially if the user is assigned multiple mandators
but not all of them. Now it will just chose one (the first one) of the
user's mandators