Make external shares work with imported self signed certificates

This moves the logic for managing trusted certificates from files_external to core, note that the certs are still stored in the files_external folder for backwards compatibilty, this is transparent for any app using the api.

To test:
- try adding a remote share from a server with a self-signed certificate, this should fail
- import the self-signed cert trough settings->personal
- try adding the remote share again, now it should work

Next step is making a nice gui for trusting the certificate when trying to add an external share from an untrusted cert

cc @schiesbn @PVince81 @simsasaile
It is not guaranteed by all of our supported PHP versions that `$_FILES['rootcert_import']['name'];` will be sanitized by the language. This might allow an user to write files to any place he want to.

Either use ownCloud's filesystem or add a sanity check here. (e.g. only alphanumeric name)