Photocured polymer electrolytes for lithium-based batteries