Power limiting and optical switching with nematic liquid-crystal films