On quasinilpotent operators and the invariant subspace problem