The Princess of Wales has smashed a bottle of whisky against the hull of a new Royal Navy warship as she officially named it HMS Glasgow.