Use a library-level variable for assigning ids
Use a library-level variable for assigning ids

The current behavior is unexpected when re-running `init()`, as every run through will start with the first `.mermaid` it finds, and start re-indexing at 0, irrespective if the original `id=mermaidChart0` is still around.

This change ensures that successive runs will not clobber old ones.
gillesdemey/mermaid,DataMcFly/mermaid,wewelove/mermaid,ollie314/mermaid,Muoversi/mermaid,gillesdemey/mermaid,DataMcFly/mermaid,DataMcFly/mermaid,BionicClick/mermaid,pnkfelix/mermaid,tylingsoft/mermaid,wcy123/mermaid,codeaudit/mermaid,pnkfelix/mermaid,9n/mermaid,gillesdemey/mermaid,mcanthony/mermaid,dbrans/mermaid,guiquanz/mermaid,mehulsbhatt/mermaid,guiquanz/mermaid,ollie314/mermaid,BionicClick/mermaid,mcanthony/mermaid,dbrans/mermaid,wuguanghai45/mermaid,knsv/mermaid,wuguanghai45/mermaid,codeaudit/mermaid,dbrans/mermaid,wewelove/mermaid,pnkfelix/mermaid,tylingsoft/mermaid,wcy123/mermaid,mehulsbhatt/mermaid,mehulsbhatt/mermaid,9n/mermaid,wcy123/mermaid,mcanthony/mermaid,wewelove/mermaid,9n/mermaid,Muoversi/mermaid,codeaudit/mermaid,tylingsoft/mermaid,Muoversi/mermaid,BionicClick/mermaid,ollie314/mermaid,wuguanghai45/mermaid,knsv/mermaid,guiquanz/mermaid