Surface layering and melting in an ionic liquid studied by resonant soft X-ray reflectivity