Functional polymer materials for use in the prevention of thermal runaway in lithium-ion batteries