Improved Navigation Experiences in Communities

Communities now works the same as Lightning Experience when using navigateToURL and an URL fragment is passed as an argument.

Where: This change applies to Lightning communities accessed through Lightning Experience and Salesforce Classic in Essentials, Enterprise, Performance, Unlimited, and Developer editions.

Why: Previous implementations of navigateToURL worked inconsistently between Lightning Experience and Communities. So code such as
$A.get("e.force:navigateToURL").setParams({ url: "#123" }).fire();
would resulted in a new tab being opened. In this update, that is no longer the case.