Fix imagerotate and move loadFromBase64() one up.

imagerotate() with third parameter being -1 does not seem to work in PHP 5.5

loadFromBase64() one up, so debug-logs aren't spammed (as much) with urlencoded
base64-data from loadFromFile() debug output.
Replace OC.Router.generate() with OC.generateUrl()
adding JSDoc + remove unused function
fixing download url in files app
remove OC.Router.registerLoadedCallback()
Add caching for getLocalFile on remote storages
fixing js unit tests
Removed obsolete OC.Router stubs in specHelper
fix issue with Non-static method Imagick ../..; @ doesn't seem to work in this case
Merge branch 'master' into fix-7307

Conflicts:
	core/js/router.js
	settings/js/admin.js
adding new javascript function OC.generateUrl(url, params)
adding js unit tests for OC.generateUrl()
Show warning page when accessing server from an untrusted domain

Added early check for the requested domain host and show a warning
page if the domain is not trusted.
Added localhost as trusted domain
Added unit tests for serverHost and other related functions
Fixed X-Forwarded-Host parsing
fix merge conflicts
fix noise not repeating
Added testArea for JS Unit tests

Added a testArea that is outside the viewport but still considered as
visible from the jQuery code.

The testArea is useful when:
- tested code tries to access DOM elements using global ids
- tested code is requiring some UI elements to be visible to activate
  themselves
Added unit tests for "add()" method for file upload

- Added OC.Upload.init() to make the code testable
- Added unit tests for the add() method of the uploader with some error
  cases