adding new javascript function OC.generateUrl(url, params)

backport of https://github.com/owncloud/core/pull/7579