From ionic monomers to ionomers for their use in Li and post-Li batteries