A new class QgsPathResolver is introduced for conversion between absolute and relative paths when reading/writing XML. Cleaned up code in layer definition file support (.qlr) to better handle relative/absolute path conversion.