Transport in inhomogeneous quantum critical fluids and in the Dirac fluid in graphene