It is possible to deploy branding artifacts, like master page, page layouts, css and so on, in SharePoint using the client side object model, without the need of a farm solution.
An old article, but still valid for content and explanation, is Self-Service Site Provisioning using Apps for SharePoint 2013.
Up-to-date solutions, containing a lot of sample and reusable code, can be found in the Office365 Developer Patterns and Practices.
In SharePoint 2013, there are two possible reasons why you can get duplicate results in your people picker searches.
The first one is that maybe there are multiple types of authentications enabled for the SharePoint zone, for example Claims and Active Directory.
In this case you should follow the article Configuring a Custom Claims Provider to be Used only on Select Zones in SharePoint 2010.
In the second case, maybe there are SAML claims users. The behavior is by design, because there is no function to get a list of users using SAML claims, so SharePoint just accepts whatever we type and assumes we are typing the correct value. There are two values that it is looking for, either the email address (which is the identifier claim in this configuration) or a role claim, and this gives duplicate results.
The solution then is to create a custom claim provider. In CodePlex it's possible to find the pre-built solution LDAP/AD Claims Provider For SharePoint 2013 that is also suggested in the article or Kirk Evans reported below. I have never tried it directly, but it seems a pre-build solution that needs to be deployed and eventually configured.
A few links about the custom claim provider:
Finally, the articles below are useful if you really want to write a really custom claim provider written by yourself:
For this, in Visual Studio 2013 you can find the HTML UI Responsiveness Profiler.
Here a few links on this topic: