Chrystia Freeland has declared her candidacy for prime minister, aiming to lead Canada as Justin Trudeau steps down.