Synthesis of a 2D nitrogen-rich π-conjugated microporous polymer for high performance lithium-ion batteries.