A categorical approach to classical and quantum Schur-Weyl duality