Optogenetics and its application in neural degeneration and regeneration