EZP-22732: add canonical link only if mainLocationId exists

This is a correction to inserts canonical link in page_head.html.twig only if location exists