MDL-40468 libraries: deprecated get_related_contexts_string()
MDL-40468 libraries: removed usages of get_related_contexts_string() in core

Also tidied up the functions by removing unused parameters.