Presidents, prime ministers and kings from around the world joined hundreds of thousands of pilgrims paying their respects to Pope John Paul II in St Peter's Square.