Optical and Spin Properties of Nitrogen-Vacancy Color Centers in Diamond Crystals, Nanodiamonds, and Proximity to Surfaces