Compactness of derivations from commutative Banach algebras