Unified approach to the Bloch–Redfield theory and quantum Fokker–Planck equations