Luminescence of Nanodiamond Driven by Atomic Functionalization: Towards Novel Detection Principles