MDL-34290 update all references after the source is changed

When several records in {files} have the same record in {files_reference} and the synchronisation is performed, we need to update
all records in {files} so all files now if source is changed and that sync was performed;
also when local moodle file content is changed we immediately update all files referencing to it (therefore sync of references
to the local files is unnecessary);
MDL-34290 class oauth_helper, added API to pass options to curl (such as timeout)
MDL-34290 repository API: allow get_file_by_reference return only filesize

we want to allow repositories to perform quick synchronisation, without downloading the file. In this case they return
only filesize, without the contenthash
MDL-34290 repository API: do not confuse source and reference

make sure that repository function get_file_source_info receives as argument the source of the file,
and get_file receives a reference;
reference is a value of DB field files_reference.reference and result of get_file_reference(source).
Fix dropbox as the only repository that have different values in those fields;
also added information about user in dropbox reference and original
MDL-34290 repository API: add timeout to get_file and throw exception

get_file should have a request timeout and throw an exception with the details (i.e. timeout reached) if download can
not be completed
MDL-34290 repository_filesystem add original info function and reduce ref lifetime
MDL-34290 repository API: add repository function to import referenced file

it must be independed from sync_external_file because sync often does not actually download contents, it is used just to retrieve
the size of the file. Besides the timeouts for get_file and sync requests are very different
add function import_external_file_contents
MDL-34290 repository_boxnet, boxlib use request timeouts

boxlib receives additional argument as request timeout
repository_boxnet::get_file_by_reference respects request timeouts and downloads file into moodle only if it is image
also some improvements to repository_boxnet source display functions
MDL-34290 repository_equella: do not download files when not needed

repository_equella::get_file_by_reference respects request timeouts, downloads only images (for thumbnail generation),
does not use cache_file class (content is cached in moodle filepool if needed);
also repository_equella has counter of unsuccessfull connect attempts and do not perform any more if 3 failed
(within one request)
MDL-34290 repository_dropbox do not download files when not needed

added function drobox::get_file_info that returns only file information (including filesize) without downloading the file;
repository_dropbox::get_file_by_reference respects request timeouts, downloads only images (for thumbnail generation),
 does not use cache_file class (content is cached in moodle filepool if needed);
Also new option for send_stored_file to serve the cached content for references and not to jump to repository
MDL-34290 remove class cache_file as not used

in fact we have moodle filepool that can work perfectly for caching files, no need to create new class and storage
MDL-34290 TODO