Rangers reached the semi-finals of the Ramsdens Cup with a 3-0 away win over holders Queen of the South.