MEMS-based filter integrating tunable Fabry–Perot cavity and grating