Four-wave mixing and luminescence of confined excitons in molecular aggregates and nanostructures. many-body green function approach