Thermal transport in van der Waals solids from first-principles calculations