Add purity annotations to all expression nodes.
Propagate purity annotations to declarations.