Implementation of techniques for computing optical properties in 0-3 dimensions, including a real-space cutoff, in ABINIT