Synthesis of carbon dots with a tunable photoluminescence and their applications for the detection of acetone and hydrogen peroxide