Hochschild homology criteria for smoothness