Effect of finite grating, waveguide width, and end-facet geometry on resonant subwavelength grating reflectivity.