Spanien besegrade England och vann ett historiskt första VM-guld i fotboll på damsidan.