A hydrothermal route to water-stable luminescent carbon dots as nanosensors for pH and temperature