Use URL prefix from settings
Also set the platform_xml field when updating the problem xml
Parse the platform_xml instead if it exists.

Also refactor the get_lab_by_location_for_xml, for shorter function.