Photonic crystal Fano lasers and Fano switches