Synthesis and modification of pristine and nitrogen-doped carbon dots by combining template pyrolysis and oxidation