[history] adds IsInHistory() to check if a path is in the history
[ui] when checking if we should return to the current directory or go to a new one when activating a media window, check the history rather than comparing the current path. fixes #15015
Merge pull request #4485 from jmarshallnz/start_in_history

Start in history - fixes ActivateWindow() links with 'return' specified