Fix for two issues

 - The secondary user groups are not assigned to the user
 - When the json file is on a NFS share where root access is not allowed this script fails with a "error: JobTemplate file (/path/to/jsonfile) doesn't exist" error

To fix the first we have to go through all the groups of the user in set_user(uid) and assign them with os.setgroups()

The second one is fixed by removing the check if the json file exists in the function validate_paramters and move that check to a new function which is called after set_user(uid). Because its possible that the new user (the one in uid) has access to that file but root hasn't
Allow override of util.unicodify default encoding with GALAXY_DEFAULT_ENCODING.
See mailing list for more information : http://dev.list.galaxyproject.org/error-with-unicode-output-tp4662783.html. It would be more correct to add a database_encoding option to universe_wsgi.ini, but that would be more work and the even correcter approach is for deployers to configure their databases to store UTF-8 data.
Fix for determining pre-existing trans.app.model.GalaxySessionToHistoryAssociation when switching histories.
Visualizations: fixes to phyloviz to allow saving and loading as a visualization
Merge stable
Fix tool description being displayed in version column.
History panel: allow operations on multiple datasets (disabled)
History panel, search: remove dbl-quote delimiters from enclosed search terms
History panel: cleanup on aisle f18fd18
Add ToolShed Functional Tests for Data Managers.
Only source a tool dependency environment file at run time if it exists.
History panel: load details only on first search (not on render of input); UI: make searchInput a jquery plugin, cleanup, add onfirstsearch
Add missing destination long arg to cli runner's Torque plugin and fix an incorrectly used PBS option in the sample job conf.
merge.
Disable extra verbose logging with API interactor on test errors.
It is useful but seems to cause sqlite locking errors.
Reset the defautl_galaxy_master_api_key to an actual value since it poses problems if set to None.
History panel: allow focus of dataset title bar and expansion on return or space keys
History page: register panel in Galaxy object
History panel: allow HDAs to be draggable
Update LWR client through LWR changeset 295fbb09de58.
Main addition here is introduction of logic for handling of implicit working directory files - namely those needed for variable count outputs (should work immediately) and setting metadata externally (requires additional changes).

Fixes bugs related to uploading empty working directory files (cannot mmap empty file) and incorrectly cleaning up of sucessful jobs when cleanup_job=never. As well as various readibility-centric refactorings.

Most interesting LWR commits this covers includes:

https://bitbucket.org/jmchilton/lwr/commits/1886ad1c0951605d2bc1a6e167f84f578563e470
https://bitbucket.org/jmchilton/lwr/commits/295fbb09de582a369e72d4331708be3f2f722e88
https://bitbucket.org/jmchilton/lwr/commits/45f0c818b91adfd63a9a4b3488a4a0d8bec1e991